template<typename MatrixType_, int UpLo_>
class Eigen::LLT< MatrixType_, UpLo_ >
Standard Cholesky decomposition (LL^T) of a matrix and associated features.
- Template Parameters
-
MatrixType_ | the type of the matrix of which we are computing the LL^T Cholesky decomposition |
UpLo_ | the triangular part that will be used for the decomposition: Lower (default) or Upper. The other triangular part won't be read. |
This class performs a LL^T Cholesky decomposition of a symmetric, positive definite matrix A such that A = LL^* = U^*U, where L is lower triangular.
While the Cholesky decomposition is particularly useful to solve selfadjoint problems like D^*D x = b, for that purpose, we recommend the Cholesky decomposition without square root which is more stable and even faster. Nevertheless, this standard Cholesky decomposition remains useful in many other situations like generalised eigen problems with hermitian matrices.
Remember that Cholesky decompositions are not rank-revealing. This LLT decomposition is only stable on positive definite matrices, use LDLT instead for the semidefinite case. Also, do not use a Cholesky decomposition to determine whether a system of equations has a solution.
Example:
A << 4, -1, 2, -1, 6, 0, 2, 0, 5;
cout << "The matrix A is" << endl << A << endl;
cout << "The Cholesky factor L is" << endl << L << endl;
cout << "To check this, let us compute L * L.transpose()" << endl;
cout << "This should equal the matrix A" << endl;
TransposeReturnType transpose()
Definition Transpose.h:160
Standard Cholesky decomposition (LL^T) of a matrix and associated features.
Definition LLT.h:70
The matrix class, also used for vectors and row-vectors.
Definition Matrix.h:186
Output:
Performance: for best performance, it is recommended to use a column-major storage format with the Lower triangular part (the default), or, equivalently, a row-major storage format with the Upper triangular part. Otherwise, you might get a 20% slowdown for the full factorization step, and rank-updates can be up to 3 times slower.
This class supports the inplace decomposition mechanism.
Note that during the decomposition, only the lower (or upper, as defined by UpLo_) triangular part of A is considered. Therefore, the strict lower part does not have to store correct values.
- See also
- MatrixBase::llt(), SelfAdjointView::llt(), class LDLT
|
const LLT & | adjoint () const EIGEN_NOEXCEPT |
|
template<typename InputType > |
LLT< MatrixType, UpLo_ > & | compute (const EigenBase< InputType > &a) |
|
ComputationInfo | info () const |
| Reports whether previous computation was successful.
|
|
| LLT () |
| Default Constructor.
|
|
template<typename InputType > |
| LLT (EigenBase< InputType > &matrix) |
| Constructs a LLT factorization from a given matrix.
|
|
| LLT (Index size) |
| Default Constructor with memory preallocation.
|
|
Traits::MatrixL | matrixL () const |
|
const MatrixType & | matrixLLT () const |
|
Traits::MatrixU | matrixU () const |
|
template<typename VectorType > |
LLT< MatrixType_, UpLo_ > & | rankUpdate (const VectorType &v, const RealScalar &sigma) |
|
RealScalar | rcond () const |
|
MatrixType | reconstructedMatrix () const |
|
template<typename Rhs > |
const Solve< LLT, Rhs > | solve (const MatrixBase< Rhs > &b) const |
|
const AdjointReturnType | adjoint () const |
|
LLT< MatrixType_, UpLo_ > & | derived () |
|
const LLT< MatrixType_, UpLo_ > & | derived () const |
|
const Solve< LLT< MatrixType_, UpLo_ >, Rhs > | solve (const MatrixBase< Rhs > &b) const |
|
| SolverBase () |
|
const ConstTransposeReturnType | transpose () const |
|
EIGEN_CONSTEXPR Index | cols () const EIGEN_NOEXCEPT |
|
LLT< MatrixType_, UpLo_ > & | derived () |
|
const LLT< MatrixType_, UpLo_ > & | derived () const |
|
EIGEN_CONSTEXPR Index | rows () const EIGEN_NOEXCEPT |
|
EIGEN_CONSTEXPR Index | size () const EIGEN_NOEXCEPT |
|