Class CholeskyDecompositionLDL_FDRM
java.lang.Object
org.ejml.dense.row.decomposition.chol.CholeskyDecompositionLDL_FDRM
- All Implemented Interfaces:
org.ejml.interfaces.decomposition.CholeskyLDLDecomposition<org.ejml.data.FMatrixRMaj>,org.ejml.interfaces.decomposition.CholeskyLDLDecomposition_F32<org.ejml.data.FMatrixRMaj>,org.ejml.interfaces.decomposition.DecompositionInterface<org.ejml.data.FMatrixRMaj>
@Generated("org.ejml.dense.row.decomposition.chol.CholeskyDecompositionLDL_DDRM")
public class CholeskyDecompositionLDL_FDRM
extends Object
implements org.ejml.interfaces.decomposition.CholeskyLDLDecomposition_F32<org.ejml.data.FMatrixRMaj>
This variant on the Cholesky decomposition avoid the need to take the square root
by performing the following decomposition:
L*D*LT=A
where L is a lower triangular matrix with zeros on the diagonal. D is a diagonal matrix.
The diagonal elements of L are equal to one.
Unfortunately the speed advantage of not computing the square root is washed out by the increased number of array accesses. There only appears to be a slight speed boost for very small matrices.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfloat[]_getVV()booleandecompose(org.ejml.data.FMatrixRMaj mat) Performs Choleksy decomposition on the provided matrix.org.ejml.data.FMatrixRMajgetD(@Nullable org.ejml.data.FMatrixRMaj D) float[]Diagonal elements of the diagonal D matrix.org.ejml.data.FMatrixRMajgetL()Returns L matrix from the decomposition.
L*D*LT=Aorg.ejml.data.FMatrixRMajgetL(@Nullable org.ejml.data.FMatrixRMaj L) booleanvoidsetExpectedMaxSize(int numRows, int numCols)
-
Constructor Details
-
CholeskyDecompositionLDL_FDRM
public CholeskyDecompositionLDL_FDRM()
-
-
Method Details
-
setExpectedMaxSize
public void setExpectedMaxSize(int numRows, int numCols) -
decompose
public boolean decompose(org.ejml.data.FMatrixRMaj 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.
- Specified by:
decomposein interfaceorg.ejml.interfaces.decomposition.DecompositionInterface<org.ejml.data.FMatrixRMaj>- Parameters:
mat- A symmetric n by n positive definite matrix.- 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.FMatrixRMaj>
-
getDiagonal
public float[] getDiagonal()Diagonal elements of the diagonal D matrix.- Specified by:
getDiagonalin interfaceorg.ejml.interfaces.decomposition.CholeskyLDLDecomposition_F32<org.ejml.data.FMatrixRMaj>- Returns:
- diagonal elements of D
-
getL
public org.ejml.data.FMatrixRMaj getL()Returns L matrix from the decomposition.
L*D*LT=A- Returns:
- A lower triangular matrix.
-
_getVV
public float[] _getVV() -
getL
public org.ejml.data.FMatrixRMaj getL(@Nullable @Nullable org.ejml.data.FMatrixRMaj L) - Specified by:
getLin interfaceorg.ejml.interfaces.decomposition.CholeskyLDLDecomposition<org.ejml.data.FMatrixRMaj>
-
getD
public org.ejml.data.FMatrixRMaj getD(@Nullable @Nullable org.ejml.data.FMatrixRMaj D) - Specified by:
getDin interfaceorg.ejml.interfaces.decomposition.CholeskyLDLDecomposition<org.ejml.data.FMatrixRMaj>
-