Class Cholesky<T extends MatrixMixin<T,?,?,?,?,?,?,?>>
java.lang.Object
org.flag4j.linalg.decompositions.chol.Cholesky<T>
- Type Parameters:
T
- The type of matrix to compute the Cholesky decomposition of.
- All Implemented Interfaces:
Decomposition<T>
- Direct Known Subclasses:
ComplexCholesky
,RealCholesky
public abstract class Cholesky<T extends MatrixMixin<T,?,?,?,?,?,?,?>>
extends Object
implements Decomposition<T>
This abstract class specifies methods for computing the Cholesky decomposition of a positive-definite matrix.
Given a hermitian positive-definite matrix A
, the Cholesky decomposition will decompose it into
A=LL
H where L
is a lower triangular matrix and L
H is the conjugate
transpose of L
.
If A
is a real valued symmetric positive-definite matrix, then the decomposition simplifies to
A=LL
T.
-
Field Summary
Modifier and TypeFieldDescriptionprotected static final double
Default tolerance for considering a value along the diagonal of L to be non-positive.(package private) final boolean
Flag indicating if the matrix to be decomposed should be explicitly checked to be hermitian (true).protected T
The lower triangular matrix resulting from the Cholesky decompositionA=LL<sup>*</sup>
. -
Constructor Summary
-
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.flag4j.linalg.decompositions.Decomposition
decompose
-
Field Details
-
DEFAULT_POS_DEF_TOLERANCE
protected static final double DEFAULT_POS_DEF_TOLERANCEDefault tolerance for considering a value along the diagonal of L to be non-positive.- See Also:
-
enforceHermitian
final boolean enforceHermitianFlag indicating if the matrix to be decomposed should be explicitly checked to be hermitian (true). If false, no check will be made and the matrix will be treated as if it were hermitian and only the lower half of the matrix will be accessed. -
L
The lower triangular matrix resulting from the Cholesky decompositionA=LL<sup>*</sup>
.
-
-
Constructor Details
-
Cholesky
public Cholesky(boolean enforceHermitian) Constructs a Cholesky decomposer.- Parameters:
enforceHermitian
- Flag indicating if the symmetry of the matrix to be decomposed should be explicitly checked (true). If false, no check will be made and the matrix will be treated as if it were symmetric and only the lower half of the matrix will be accessed.
-
-
Method Details
-
getL
Gets theL
matrix computed by the Cholesky decompositionA=LL<sup>*</sup>
.- Returns:
- The
L
matrix from the Cholesky decompositionA=LL<sup>*</sup>
.
-
getLH
Gets theL
matrix computed by the Cholesky decompositionA=LL<sup>*</sup>
.- Returns:
- The
L
matrix from the Cholesky decompositionA=LL<sup>*</sup>
.
-