Class CholeskyDecompositionCommon_DDRM
- java.lang.Object
-
- org.ejml.dense.row.decomposition.chol.CholeskyDecompositionCommon_DDRM
-
- All Implemented Interfaces:
org.ejml.interfaces.decomposition.CholeskyDecomposition<org.ejml.data.DMatrixRMaj>,org.ejml.interfaces.decomposition.CholeskyDecomposition_F64<org.ejml.data.DMatrixRMaj>,org.ejml.interfaces.decomposition.DecompositionInterface<org.ejml.data.DMatrixRMaj>
- Direct Known Subclasses:
CholeskyDecompositionBlock_DDRM,CholeskyDecompositionInner_DDRM
public abstract class CholeskyDecompositionCommon_DDRM extends java.lang.Object implements org.ejml.interfaces.decomposition.CholeskyDecomposition_F64<org.ejml.data.DMatrixRMaj>This is an abstract class for a Cholesky decomposition. It provides the solvers, but the actual decomposition is provided in other classes.
- See Also:
CholeskyDecomposition_F64
-
-
Constructor Summary
Constructors Constructor Description CholeskyDecompositionCommon_DDRM(boolean lower)Specifies if a lower or upper variant should be constructed.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description double[]_getVV()org.ejml.data.Complex_F64computeDeterminant()booleandecompose(org.ejml.data.DMatrixRMaj mat)Performs Choleksy decomposition on the provided matrix.protected abstract booleandecomposeLower()Performs an lower triangular decomposition.protected abstract booleandecomposeUpper()Performs an upper triangular decomposition.org.ejml.data.DMatrixRMajgetT()Returns the triangular matrix from the decomposition.org.ejml.data.DMatrixRMajgetT(org.ejml.data.DMatrixRMaj T)booleaninputModified()booleanisLower()If true the decomposition was for a lower triangular matrix.voidsetExpectedMaxSize(int numRows, int numCols)
-
-
-
Method Detail
-
setExpectedMaxSize
public void setExpectedMaxSize(int numRows, int numCols)
-
isLower
public boolean isLower()
If true the decomposition was for a lower triangular matrix. If false it was for an upper triangular matrix.- Specified by:
isLowerin interfaceorg.ejml.interfaces.decomposition.CholeskyDecomposition<org.ejml.data.DMatrixRMaj>- Returns:
- True if lower, false if upper.
-
decompose
public boolean decompose(org.ejml.data.DMatrixRMaj mat)
Performs Choleksy decomposition on the provided matrix.
If the matrix is not positive definite then this function will return false since it can't complete its computations. Not all errors will be found. This is an efficient way to check for positive definiteness.
- Specified by:
decomposein interfaceorg.ejml.interfaces.decomposition.DecompositionInterface<org.ejml.data.DMatrixRMaj>- Parameters:
mat- A symmetric positive definite matrix with n ≤ widthMax.- Returns:
- True if it was able to finish the decomposition.
-
inputModified
public boolean inputModified()
- Specified by:
inputModifiedin interfaceorg.ejml.interfaces.decomposition.DecompositionInterface<org.ejml.data.DMatrixRMaj>
-
decomposeLower
protected abstract boolean decomposeLower()
Performs an lower triangular decomposition.- Returns:
- true if the matrix was decomposed.
-
decomposeUpper
protected abstract boolean decomposeUpper()
Performs an upper triangular decomposition.- Returns:
- true if the matrix was decomposed.
-
getT
public org.ejml.data.DMatrixRMaj getT(org.ejml.data.DMatrixRMaj T)
- Specified by:
getTin interfaceorg.ejml.interfaces.decomposition.CholeskyDecomposition<org.ejml.data.DMatrixRMaj>
-
getT
public org.ejml.data.DMatrixRMaj getT()
Returns the triangular matrix from the decomposition.- Returns:
- A lower or upper triangular matrix.
-
_getVV
public double[] _getVV()
-
computeDeterminant
public org.ejml.data.Complex_F64 computeDeterminant()
- Specified by:
computeDeterminantin interfaceorg.ejml.interfaces.decomposition.CholeskyDecomposition_F64<org.ejml.data.DMatrixRMaj>
-
-