public interface LUDecomposition<T extends Matrix> extends DecompositionInterface<T>
LU Decomposition is useful since once the decomposition has been performed linear equations can be quickly solved and the original matrix A inverted. Different algorithms can be selected to perform the decomposition, all will have the same end result.
To use this class first specify the size of the matrix that will be decomposed by it in
the constructor. Only square m by m matrices can be decomposed. Then to decompose a matrix
call DecompositionInterface.decompose(T)
. If it encounters any problems an exception will be thrown. After
that all the other functions will be available for solving and inverting matrices.
Modifier and Type | Method and Description |
---|---|
T |
getLower(T lower)
Returns the L matrix from the decomposition.
|
T |
getRowPivot(T pivot)
For numerical stability there are often row interchanges.
|
int[] |
getRowPivotV(IGrowArray pivot)
Returns the row pivot vector
|
T |
getUpper(T upper)
Returns the U matrix from the decomposition.
|
boolean |
isSingular()
Returns true if the decomposition detected a singular matrix.
|
decompose, inputModified
T getLower(T lower)
Returns the L matrix from the decomposition. Should only
be called after DecompositionInterface.decompose(org.ejml.data.Matrix)
has
been called.
If parameter 'lower' is not null, then that matrix is used to store the L matrix. Otherwise a new matrix is created.
lower
- Storage for T matrix. If null then a new matrix is returned. Modified.T getUpper(T upper)
Returns the U matrix from the decomposition. Should only
be called after DecompositionInterface.decompose(org.ejml.data.Matrix)
has
been called.
If parameter 'upper' is not null, then that matrix is used to store the U matrix. Otherwise a new matrix is created.
upper
- Storage for U matrix. If null then a new matrix is returned. Modified.T getRowPivot(T pivot)
For numerical stability there are often row interchanges. This computes a pivot matrix that will undo those changes.
pivot
- Storage for the pivot matrix. If null then a new matrix is returned. Modified.int[] getRowPivotV(IGrowArray pivot)
pivot
- (Optional) Storage for pivot vectorboolean isSingular()