org.ejml.alg.dense.decomposition.chol
Class CholeskyDecompositionLDL

java.lang.Object
  extended by org.ejml.alg.dense.decomposition.chol.CholeskyDecompositionLDL
All Implemented Interfaces:
DecompositionInterface<DenseMatrix64F>

public class CholeskyDecompositionLDL
extends Object
implements DecompositionInterface<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.

Author:
Peter Abeles

Constructor Summary
CholeskyDecompositionLDL()
           
 
Method Summary
 double[] _getVV()
           
 boolean decompose(DenseMatrix64F mat)
           Performs Choleksy decomposition on the provided matrix.
 double[] getD()
          Diagonal elements of the diagonal D matrix.
 DenseMatrix64F getL()
          Returns L matrix from the decomposition.
L*D*LT=A
 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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CholeskyDecompositionLDL

public CholeskyDecompositionLDL()
Method Detail

setExpectedMaxSize

public void setExpectedMaxSize(int numRows,
                               int numCols)

decompose

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.

Specified by:
decompose in interface DecompositionInterface<DenseMatrix64F>
Parameters:
mat - A symetric n by n positive definite matrix.
Returns:
True if it was able to finish the decomposition.

inputModified

public boolean inputModified()
Description copied from interface: DecompositionInterface
Is the input matrix to DecompositionInterface.decompose(org.ejml.data.Matrix64F) is modified during the decomposition process.

Specified by:
inputModified in interface DecompositionInterface<DenseMatrix64F>
Returns:
true if the input matrix to decompose() is modified.

getD

public double[] getD()
Diagonal elements of the diagonal D matrix.

Returns:
diagonal elements of D

getL

public DenseMatrix64F getL()
Returns L matrix from the decomposition.
L*D*LT=A

Returns:
A lower triangular matrix.

_getVV

public double[] _getVV()


Copyright © 2012. All Rights Reserved.