Robust Cholesky decomposition of a matrix with pivoting.
MatrixType | the type of the matrix of which to compute the LDL^T Cholesky decomposition |
Perform a robust Cholesky decomposition of a positive semidefinite or negative semidefinite matrix such that
, where P is a permutation matrix, L is lower triangular with a unit diagonal and D is a diagonal matrix.
The decomposition uses pivoting to ensure stability, so that L will have zeros in the bottom right rank(A) - n submatrix. Avoiding the square root on D also stabilizes the computation.
Remember that Cholesky decompositions are not rank-revealing. Also, do not use a Cholesky decomposition to determine whether a system of equations has a solution.
Definition at line 59 of file LDLT.h.
#include <src/Cholesky/LDLT.h>
Public Types | |
enum | { RowsAtCompileTime = MatrixType::RowsAtCompileTime, ColsAtCompileTime = MatrixType::ColsAtCompileTime, Options = MatrixType::Options & ~RowMajorBit, MaxRowsAtCompileTime = MatrixType::MaxRowsAtCompileTime, MaxColsAtCompileTime = MatrixType::MaxColsAtCompileTime, UpLo = _UpLo } |
typedef _MatrixType | MatrixType |
typedef MatrixType::Scalar | Scalar |
typedef NumTraits< typename MatrixType::Scalar >::Real | RealScalar |
typedef MatrixType::Index | Index |
typedef Matrix< Scalar, RowsAtCompileTime, 1, Options, MaxRowsAtCompileTime, 1 > | TmpMatrixType |
typedef Transpositions < RowsAtCompileTime, MaxRowsAtCompileTime > | TranspositionType |
typedef PermutationMatrix < RowsAtCompileTime, MaxRowsAtCompileTime > | PermutationType |
typedef internal::LDLT_Traits < MatrixType, UpLo > | Traits |
Public Member Functions | |
LDLT () | |
Default Constructor. | |
LDLT (Index size) | |
Default Constructor with memory preallocation. | |
LDLT (const MatrixType &matrix) | |
Traits::MatrixU | matrixU () const |
Traits::MatrixL | matrixL () const |
const TranspositionType & | transpositionsP () const |
Diagonal< const MatrixType > | vectorD (void) const |
bool | isPositive (void) const |
bool | isNegative (void) const |
template<typename Rhs > | |
const internal::solve_retval < LDLT, Rhs > | solve (const MatrixBase< Rhs > &b) const |
template<typename Derived > | |
bool | solveInPlace (MatrixBase< Derived > &bAndX) const |
LDLT & | compute (const MatrixType &matrix) |
Compute / recompute the LDLT decomposition A = L D L^* = U^* D U of matrix. | |
const MatrixType & | matrixLDLT () const |
MatrixType | reconstructedMatrix () const |
Index | rows () const |
Index | cols () const |
Protected Attributes | |
MatrixType | m_matrix |
TranspositionType | m_transpositions |
TmpMatrixType | m_temporary |
int | m_sign |
bool | m_isInitialized |
typedef _MatrixType LDLT< _MatrixType, _UpLo >::MatrixType |
typedef PermutationMatrix<RowsAtCompileTime, MaxRowsAtCompileTime> LDLT< _MatrixType, _UpLo >::PermutationType |
typedef NumTraits<typename MatrixType::Scalar>::Real LDLT< _MatrixType, _UpLo >::RealScalar |
typedef Matrix<Scalar, RowsAtCompileTime, 1, Options, MaxRowsAtCompileTime, 1> LDLT< _MatrixType, _UpLo >::TmpMatrixType |
typedef internal::LDLT_Traits<MatrixType,UpLo> LDLT< _MatrixType, _UpLo >::Traits |
typedef Transpositions<RowsAtCompileTime, MaxRowsAtCompileTime> LDLT< _MatrixType, _UpLo >::TranspositionType |
anonymous enum |
Default Constructor.
The default constructor is useful in cases in which the user intends to perform decompositions via LDLT::compute(const MatrixType&).
LDLT< _MatrixType, _UpLo >::LDLT | ( | const MatrixType & | matrix | ) | [inline] |
Definition at line 101 of file LDLT.h.
References LDLT< _MatrixType, _UpLo >::compute().
Definition at line 187 of file LDLT.h.
References LDLT< _MatrixType, _UpLo >::m_matrix.
LDLT< MatrixType, _UpLo > & LDLT< MatrixType, _UpLo >::compute | ( | const MatrixType & | matrix | ) |
Compute / recompute the LDLT decomposition A = L D L^* = U^* D U of matrix.
Definition at line 328 of file LDLT.h.
References eigen_assert, LDLT< _MatrixType, _UpLo >::m_isInitialized, LDLT< _MatrixType, _UpLo >::m_matrix, LDLT< _MatrixType, _UpLo >::m_sign, LDLT< _MatrixType, _UpLo >::m_temporary, LDLT< _MatrixType, _UpLo >::m_transpositions, PlainObjectBase< Derived >::resize(), Transpositions< SizeAtCompileTime, MaxSizeAtCompileTime >::resize(), and mrpt::math::size().
Referenced by LDLT< _MatrixType, _UpLo >::LDLT().
bool LDLT< _MatrixType, _UpLo >::isNegative | ( | void | ) | const [inline] |
Definition at line 147 of file LDLT.h.
References eigen_assert, LDLT< _MatrixType, _UpLo >::m_isInitialized, and LDLT< _MatrixType, _UpLo >::m_sign.
bool LDLT< _MatrixType, _UpLo >::isPositive | ( | void | ) | const [inline] |
Definition at line 140 of file LDLT.h.
References eigen_assert, LDLT< _MatrixType, _UpLo >::m_isInitialized, and LDLT< _MatrixType, _UpLo >::m_sign.
Traits::MatrixL LDLT< _MatrixType, _UpLo >::matrixL | ( | ) | const [inline] |
Definition at line 118 of file LDLT.h.
References eigen_assert, LDLT< _MatrixType, _UpLo >::m_isInitialized, and LDLT< _MatrixType, _UpLo >::m_matrix.
Referenced by LDLT< _MatrixType, _UpLo >::reconstructedMatrix().
const MatrixType& LDLT< _MatrixType, _UpLo >::matrixLDLT | ( | ) | const [inline] |
TODO: document the storage layout
Definition at line 178 of file LDLT.h.
References eigen_assert, LDLT< _MatrixType, _UpLo >::m_isInitialized, and LDLT< _MatrixType, _UpLo >::m_matrix.
Traits::MatrixU LDLT< _MatrixType, _UpLo >::matrixU | ( | ) | const [inline] |
Definition at line 111 of file LDLT.h.
References eigen_assert, LDLT< _MatrixType, _UpLo >::m_isInitialized, and LDLT< _MatrixType, _UpLo >::m_matrix.
Referenced by LDLT< _MatrixType, _UpLo >::reconstructedMatrix().
MatrixType LDLT< MatrixType, _UpLo >::reconstructedMatrix | ( | ) | const |
Definition at line 404 of file LDLT.h.
References eigen_assert, LDLT< _MatrixType, _UpLo >::m_isInitialized, LDLT< _MatrixType, _UpLo >::m_matrix, LDLT< _MatrixType, _UpLo >::matrixL(), LDLT< _MatrixType, _UpLo >::matrixU(), mrpt::math::size(), Transpositions< SizeAtCompileTime, MaxSizeAtCompileTime >::transpose(), LDLT< _MatrixType, _UpLo >::transpositionsP(), and LDLT< _MatrixType, _UpLo >::vectorD().
Definition at line 186 of file LDLT.h.
References LDLT< _MatrixType, _UpLo >::m_matrix.
const internal::solve_retval<LDLT, Rhs> LDLT< _MatrixType, _UpLo >::solve | ( | const MatrixBase< Rhs > & | b | ) | const [inline] |
Definition at line 161 of file LDLT.h.
References eigen_assert, LDLT< _MatrixType, _UpLo >::m_isInitialized, and LDLT< _MatrixType, _UpLo >::m_matrix.
Referenced by LDLT< _MatrixType, _UpLo >::solveInPlace().
bool LDLT< MatrixType, _UpLo >::solveInPlace | ( | MatrixBase< Derived > & | bAndX | ) | const |
Definition at line 389 of file LDLT.h.
References eigen_assert, LDLT< _MatrixType, _UpLo >::m_isInitialized, LDLT< _MatrixType, _UpLo >::m_matrix, mrpt::math::size(), and LDLT< _MatrixType, _UpLo >::solve().
const TranspositionType& LDLT< _MatrixType, _UpLo >::transpositionsP | ( | ) | const [inline] |
Definition at line 126 of file LDLT.h.
References eigen_assert, LDLT< _MatrixType, _UpLo >::m_isInitialized, and LDLT< _MatrixType, _UpLo >::m_transpositions.
Referenced by LDLT< _MatrixType, _UpLo >::reconstructedMatrix().
Diagonal<const MatrixType> LDLT< _MatrixType, _UpLo >::vectorD | ( | void | ) | const [inline] |
Definition at line 133 of file LDLT.h.
References eigen_assert, LDLT< _MatrixType, _UpLo >::m_isInitialized, and LDLT< _MatrixType, _UpLo >::m_matrix.
Referenced by LDLT< _MatrixType, _UpLo >::reconstructedMatrix().
bool LDLT< _MatrixType, _UpLo >::m_isInitialized [protected] |
Definition at line 201 of file LDLT.h.
Referenced by LDLT< _MatrixType, _UpLo >::compute(), LDLT< _MatrixType, _UpLo >::isNegative(), LDLT< _MatrixType, _UpLo >::isPositive(), LDLT< _MatrixType, _UpLo >::matrixL(), LDLT< _MatrixType, _UpLo >::matrixLDLT(), LDLT< _MatrixType, _UpLo >::matrixU(), LDLT< _MatrixType, _UpLo >::reconstructedMatrix(), LDLT< _MatrixType, _UpLo >::solve(), LDLT< _MatrixType, _UpLo >::solveInPlace(), LDLT< _MatrixType, _UpLo >::transpositionsP(), and LDLT< _MatrixType, _UpLo >::vectorD().
MatrixType LDLT< _MatrixType, _UpLo >::m_matrix [protected] |
Definition at line 197 of file LDLT.h.
Referenced by LDLT< _MatrixType, _UpLo >::cols(), LDLT< _MatrixType, _UpLo >::compute(), LDLT< _MatrixType, _UpLo >::matrixL(), LDLT< _MatrixType, _UpLo >::matrixLDLT(), LDLT< _MatrixType, _UpLo >::matrixU(), LDLT< _MatrixType, _UpLo >::reconstructedMatrix(), LDLT< _MatrixType, _UpLo >::rows(), LDLT< _MatrixType, _UpLo >::solve(), LDLT< _MatrixType, _UpLo >::solveInPlace(), and LDLT< _MatrixType, _UpLo >::vectorD().
Definition at line 200 of file LDLT.h.
Referenced by LDLT< _MatrixType, _UpLo >::compute(), LDLT< _MatrixType, _UpLo >::isNegative(), and LDLT< _MatrixType, _UpLo >::isPositive().
TmpMatrixType LDLT< _MatrixType, _UpLo >::m_temporary [protected] |
Definition at line 199 of file LDLT.h.
Referenced by LDLT< _MatrixType, _UpLo >::compute().
TranspositionType LDLT< _MatrixType, _UpLo >::m_transpositions [protected] |
Definition at line 198 of file LDLT.h.
Referenced by LDLT< _MatrixType, _UpLo >::compute(), and LDLT< _MatrixType, _UpLo >::transpositionsP().
Page generated by Doxygen 1.7.1 for MRPT 0.9.4 SVN: at Mon Jan 10 23:33:19 UTC 2011 |