public class CholeskyDecompositionLDL_D64 extends java.lang.Object implements CholeskyLDLDecomposition<DenseMatrix64F>
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 and Description |
|---|
CholeskyDecompositionLDL_D64() |
| Modifier and Type | Method and Description |
|---|---|
double[] |
_getVV() |
boolean |
decompose(DenseMatrix64F mat)
Performs Choleksy decomposition on the provided matrix.
|
DenseMatrix64F |
getD(DenseMatrix64F D)
Returns the diagonal matrixfrom the decomposition.
|
double[] |
getDiagonal()
Diagonal elements of the diagonal D matrix.
|
DenseMatrix64F |
getL()
Returns L matrix from the decomposition.
L*D*LT=A |
DenseMatrix64F |
getL(DenseMatrix64F L)
Returns the lower triangular matrix from the decomposition.
|
boolean |
inputModified()
Is the input matrix to
DecompositionInterface.decompose(org.ejml.data.Matrix64F) is modified during
the decomposition process. |
void |
setExpectedMaxSize(int numRows,
int numCols) |
public void setExpectedMaxSize(int numRows,
int numCols)
public boolean decompose(DenseMatrix64F 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.
decompose in interface DecompositionInterface<DenseMatrix64F>mat - A symetric n by n positive definite matrix.public boolean inputModified()
DecompositionInterfaceDecompositionInterface.decompose(org.ejml.data.Matrix64F) is modified during
the decomposition process.inputModified in interface DecompositionInterface<DenseMatrix64F>public double[] getDiagonal()
getDiagonal in interface CholeskyLDLDecomposition<DenseMatrix64F>public DenseMatrix64F getL()
public double[] _getVV()
public DenseMatrix64F getL(DenseMatrix64F L)
CholeskyLDLDecompositionReturns the lower triangular matrix from the decomposition.
If an input is provided that matrix is used to write the results to. Otherwise a new matrix is created and the results written to it.
getL in interface CholeskyLDLDecomposition<DenseMatrix64F>L - If not null then the decomposed matrix is written here.public DenseMatrix64F getD(DenseMatrix64F D)
CholeskyLDLDecompositionReturns the diagonal matrixfrom the decomposition.
If an input is provided that matrix is used to write the results to. Otherwise a new matrix is created and the results written to it.
getD in interface CholeskyLDLDecomposition<DenseMatrix64F>D - If not null it will be used to store the diagonal matrix