MatrixType | the type of the matrix of which we are computing the LDL^T Cholesky decomposition |
Compared to a standard Cholesky decomposition, avoiding the square roots allows for faster and more stable computation.
Note that during the decomposition, only the upper triangular part of A is considered. Therefore, the strict lower part does not have to store correct values.
Public Types | |
typedef NumTraits< typename MatrixType::Scalar >::Real | RealScalar |
typedef MatrixType::Scalar | Scalar |
typedef Matrix< Scalar, MatrixType::ColsAtCompileTime, 1 > | VectorType |
Public Member Functions | |
void | compute (const MatrixType &matrix) |
bool | isPositiveDefinite (void) const |
LDLT (const MatrixType &matrix) | |
Part< MatrixType, UnitLowerTriangular > | matrixL (void) const |
template<typename RhsDerived, typename ResDerived> | |
bool | solve (const MatrixBase< RhsDerived > &b, MatrixBase< ResDerived > *result) const |
template<typename Derived> | |
bool | solveInPlace (MatrixBase< Derived > &bAndX) const |
DiagonalCoeffs< MatrixType > | vectorD (void) const |
Protected Attributes | |
bool | m_isPositiveDefinite |
MatrixType | m_matrix |
void compute | ( | const MatrixType & | a | ) | [inline] |
Compute / recompute the LLT decomposition A = L D L^* = U^* D U of matrix
bool isPositiveDefinite | ( | void | ) | const [inline] |
Part<MatrixType, UnitLowerTriangular> matrixL | ( | void | ) | const [inline] |
bool solve | ( | const MatrixBase< RhsDerived > & | b, | |
MatrixBase< ResDerived > * | result | |||
) | const [inline] |
Computes the solution x of using the current decomposition of A. The result is stored in result
bool solveInPlace | ( | MatrixBase< Derived > & | bAndX | ) | const [inline] |
This is the in-place version of solve().
bAndX | represents both the right-hand side matrix b and result x. |
DiagonalCoeffs<MatrixType> vectorD | ( | void | ) | const [inline] |