Class FieldLU<T extends Field<T>>
java.lang.Object
org.flag4j.linalg.decompositions.lu.LU<FieldMatrix<T>>
org.flag4j.linalg.decompositions.lu.FieldLU<T>
- All Implemented Interfaces:
Decomposition<FieldMatrix<T>>
-
Nested Class Summary
Nested classes/interfaces inherited from class org.flag4j.linalg.decompositions.lu.LU
LU.Pivoting
-
Field Summary
Fields inherited from class org.flag4j.linalg.decompositions.lu.LU
colSwaps, LU, numColSwaps, numRowSwaps, P, pivotFlag, Q, rowSwaps, zeroPivotTol
-
Constructor Summary
ConstructorDescriptionFieldLU()
Constructs a LU decomposer to decompose the specified matrix using partial pivoting.FieldLU
(LU.Pivoting pivoting) Constructs a LU decomposer to decompose the specified matrix.FieldLU
(LU.Pivoting pivoting, double zeroPivotTol) Constructs a LU decomposer to decompose the specified matrix. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Computes the LU decomposition using full/rook pivoting (i.e. row and column swapping).getL()
Gets the unit lower triangular matrix of the decomposition.getU()
Gets the upper triangular matrix of the decomposition.protected void
initLU
(FieldMatrix<T> src) Initializes theLU
matrix by copying the source matrix to decompose.protected void
noPivot()
Computes the LU decomposition using no pivoting (i.e. rows and columns are not swapped).protected void
Computes the LU decomposition using partial pivoting (i.e. row swapping).Methods inherited from class org.flag4j.linalg.decompositions.lu.LU
decompose, getLU, getNumColSwaps, getNumRowSwaps, getP, getQ, swapCols, swapRows
-
Constructor Details
-
FieldLU
public FieldLU()Constructs a LU decomposer to decompose the specified matrix using partial pivoting. -
FieldLU
Constructs a LU decomposer to decompose the specified matrix.- Parameters:
pivoting
- Pivoting to use. If pivoting is 2, full pivoting will be used. If pivoting is 1, partial pivoting will be used. If pivoting is any other value, no pivoting will be used.
-
FieldLU
Constructs a LU decomposer to decompose the specified matrix.- Parameters:
pivoting
- Pivoting to use. If pivoting is 2, full pivoting will be used. If pivoting is 1, partial pivoting will be used. If pivoting is any other value, no pivoting will be used.zeroPivotTol
- Value for determining if a zero pivot value is detected when computing the LU decomposition with no pivoting. If a pivot value (value along the principle diagonal of U) is within this tolerance from zero, then an exception will be thrown if solving with no pivoting.
-
-
Method Details
-
initLU
Initializes theLU
matrix by copying the source matrix to decompose. -
noPivot
-
partialPivot
protected void partialPivot()Computes the LU decomposition using partial pivoting (i.e. row swapping).- Specified by:
partialPivot
in classLU<FieldMatrix<T extends Field<T>>>
-
fullPivot
-
getL
Gets the unit lower triangular matrix of the decomposition. -
getU
Gets the upper triangular matrix of the decomposition.
-