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.
The Cholesky decomposition is essentially a special case of the LU
decomposition
for Hermitian positive-definite matrices where the upper triangular matrix is the Hermitian transpose
of the lower triangular matrix.
Given a Hermitian positive-definite matrix A, the Cholesky decomposition will decompose it into A=LLH where L is a lower triangular matrix and LH is the conjugate transpose of L.
If A is a real valued symmetric positive-definite matrix, then the decomposition simplifies to A=LLT.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final double
Default tolerance for considering a value along the diagonal of L to be non-positive.protected T
The lower triangular matrix, L, resulting from the Cholesky decomposition A=LLH. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Cholesky
(boolean enforceHermitian) Constructs a Cholesky decomposer. -
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:
-
L
The lower triangular matrix, L, resulting from the Cholesky decomposition A=LLH.
-
-
Constructor Details
-
Cholesky
protected Cholesky(boolean enforceHermitian) Constructs a Cholesky decomposer.- Parameters:
enforceHermitian
- Flag indicating if the matrix to be decomposed should be explicitly checked to be Hermitian (true
). Iffalse
, 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.
-
-
Method Details
-
getL
Gets the L matrix computed by the Cholesky decomposition A=LLH.- Returns:
- The
L
matrix from the Cholesky decomposition A=LLH.
-
getLH
Gets the LH matrix computed by the Cholesky decomposition A=LLH.- Returns:
- The LH matrix from the Cholesky decomposition A=LLH.
-