T
- the type of the field elementspublic class FieldLUDecomposition<T extends FieldElement<T>> extends Object
The LUP-decomposition of a matrix A consists of three matrices L, U and P that satisfy: PA = LU, L is lower triangular, and U is upper triangular and P is a permutation matrix. All matrices are m×m.
This class is based on the class with similar name from the JAMA library.
getP
method has been added,det
method has been renamed as getDeterminant
,getDoublePivot
method has been removed (but the int based
getPivot
method has been kept),solve
and isNonSingular
methods have been replaced
by a getSolver
method and the equivalent methods
provided by the returned DecompositionSolver
.Constructor and Description |
---|
FieldLUDecomposition(FieldMatrix<T> matrix)
Calculates the LU-decomposition of the given matrix.
|
FieldLUDecomposition(FieldMatrix<T> matrix,
Predicate<T> zeroChecker)
Calculates the LU-decomposition of the given matrix.
|
FieldLUDecomposition(FieldMatrix<T> matrix,
Predicate<T> zeroChecker,
boolean numericPermutationChoice)
Calculates the LU-decomposition of the given matrix.
|
Modifier and Type | Method and Description |
---|---|
T |
getDeterminant()
Return the determinant of the matrix.
|
FieldMatrix<T> |
getL()
Returns the matrix L of the decomposition.
|
FieldMatrix<T> |
getP()
Returns the P rows permutation matrix.
|
int[] |
getPivot()
Returns the pivot permutation vector.
|
FieldDecompositionSolver<T> |
getSolver()
Get a solver for finding the A × X = B solution in exact linear sense.
|
FieldMatrix<T> |
getU()
Returns the matrix U of the decomposition.
|
public FieldLUDecomposition(FieldMatrix<T> matrix)
By default, numericPermutationChoice
is set to true
.
matrix
- The matrix to decompose.MathIllegalArgumentException
- if matrix is not squareFieldLUDecomposition(FieldMatrix, Predicate)
,
FieldLUDecomposition(FieldMatrix, Predicate, boolean)
public FieldLUDecomposition(FieldMatrix<T> matrix, Predicate<T> zeroChecker)
By default, numericPermutationChoice
is set to true
.
matrix
- The matrix to decompose.zeroChecker
- checker for zero elementsMathIllegalArgumentException
- if matrix is not squareFieldLUDecomposition(FieldMatrix, Predicate, boolean)
public FieldLUDecomposition(FieldMatrix<T> matrix, Predicate<T> zeroChecker, boolean numericPermutationChoice)
matrix
- The matrix to decompose.zeroChecker
- checker for zero elementsnumericPermutationChoice
- if true
choose permutation index with numeric calculations, otherwise choose with zeroChecker
MathIllegalArgumentException
- if matrix is not squarepublic FieldMatrix<T> getL()
L is a lower-triangular matrix
public FieldMatrix<T> getU()
U is an upper-triangular matrix
public FieldMatrix<T> getP()
P is a sparse matrix with exactly one element set to 1.0 in each row and each column, all other elements being set to 0.0.
The positions of the 1 elements are given by the pivot permutation vector
.
getPivot()
public int[] getPivot()
getP()
public T getDeterminant()
public FieldDecompositionSolver<T> getSolver()
Copyright © 2016-2021 CS GROUP. All rights reserved.