Standard Cholesky decomposition (LL^T) of a matrix and associated features. More...
#include <LLT.h>
Public Member Functions | |
template<typename RhsType , typename DstType > | |
void | _solve_impl (const RhsType &rhs, DstType &dst) const |
template<bool Conjugate, typename RhsType , typename DstType > | |
void | _solve_impl_transposed (const RhsType &rhs, DstType &dst) const |
const LLT & | adjoint () const EIGEN_NOEXCEPT |
EIGEN_CONSTEXPR Index | cols () const EIGEN_NOEXCEPT |
template<typename InputType > | |
LLT< MatrixType, _UpLo > & | compute (const EigenBase< InputType > &a) |
template<typename InputType > | |
LLT & | compute (const EigenBase< InputType > &matrix) |
ComputationInfo | info () const |
Reports whether previous computation was successful. More... | |
LLT () | |
Default Constructor. More... | |
template<typename InputType > | |
LLT (const EigenBase< InputType > &matrix) | |
template<typename InputType > | |
LLT (EigenBase< InputType > &matrix) | |
Constructs a LLT factorization from a given matrix. More... | |
LLT (Index size) | |
Default Constructor with memory preallocation. More... | |
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) |
template<typename VectorType > | |
LLT & | rankUpdate (const VectorType &vec, const RealScalar &sigma=1) |
RealScalar | rcond () const |
MatrixType | reconstructedMatrix () const |
EIGEN_CONSTEXPR Index | rows () const EIGEN_NOEXCEPT |
template<typename Derived > | |
void | solveInPlace (const MatrixBase< Derived > &bAndX) const |
![]() | |
AdjointReturnType | adjoint () const |
EIGEN_DEVICE_FUNC LLT< _MatrixType, _UpLo > & | derived () |
const EIGEN_DEVICE_FUNC LLT< _MatrixType, _UpLo > & | derived () const |
const Solve< LLT< _MatrixType, _UpLo >, Rhs > | solve (const MatrixBase< Rhs > &b) const |
SolverBase () | |
ConstTransposeReturnType | transpose () const |
~SolverBase () | |
![]() | |
EIGEN_DEVICE_FUNC void | addTo (Dest &dst) const |
EIGEN_DEVICE_FUNC void | applyThisOnTheLeft (Dest &dst) const |
EIGEN_DEVICE_FUNC void | applyThisOnTheRight (Dest &dst) const |
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index | cols () const EIGEN_NOEXCEPT |
EIGEN_DEVICE_FUNC LLT< _MatrixType, _UpLo > & | const_cast_derived () const |
const EIGEN_DEVICE_FUNC LLT< _MatrixType, _UpLo > & | const_derived () const |
EIGEN_DEVICE_FUNC LLT< _MatrixType, _UpLo > & | derived () |
const EIGEN_DEVICE_FUNC LLT< _MatrixType, _UpLo > & | derived () const |
EIGEN_DEVICE_FUNC void | evalTo (Dest &dst) const |
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index | rows () const EIGEN_NOEXCEPT |
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index | size () const EIGEN_NOEXCEPT |
EIGEN_DEVICE_FUNC void | subTo (Dest &dst) const |
Static Protected Member Functions | |
static void | check_template_parameters () |
Protected Attributes | |
ComputationInfo | m_info |
bool | m_isInitialized |
RealScalar | m_l1_norm |
MatrixType | m_matrix |
Friends | |
class | SolverBase< LLT > |
Additional Inherited Members | |
![]() | |
void | _check_solve_assertion (const Rhs &b) const |
Standard Cholesky decomposition (LL^T) of a matrix and associated features.
_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 decompositon: 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:
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.
typedef SolverBase<LLT> Eigen::LLT< _MatrixType, _UpLo >::Base |
typedef _MatrixType Eigen::LLT< _MatrixType, _UpLo >::MatrixType |
typedef internal::LLT_Traits<MatrixType,UpLo> Eigen::LLT< _MatrixType, _UpLo >::Traits |
anonymous enum |
anonymous enum |
|
inline |
|
inlineexplicit |
|
inlineexplicit |
|
inlineexplicit |
Constructs a LLT factorization from a given matrix.
This overloaded constructor is provided for inplace decomposition when MatrixType
is a Eigen::Ref.
void Eigen::LLT< _MatrixType, _UpLo >::_solve_impl | ( | const RhsType & | rhs, |
DstType & | dst | ||
) | const |
void Eigen::LLT< _MatrixType, _UpLo >::_solve_impl_transposed | ( | const RhsType & | rhs, |
DstType & | dst | ||
) | const |
|
inline |
*this
, that is, a const reference to the decomposition itself as the underlying matrix is self-adjoint.This method is provided for compatibility with other matrix decompositions, thus enabling generic code such as:
|
inlinestaticprotected |
|
inline |
LLT<MatrixType,_UpLo>& Eigen::LLT< _MatrixType, _UpLo >::compute | ( | const EigenBase< InputType > & | a | ) |
Computes / recomputes the Cholesky decomposition A = LL^* = U^*U of matrix
Example:
Output:
LLT& Eigen::LLT< _MatrixType, _UpLo >::compute | ( | const EigenBase< InputType > & | matrix | ) |
|
inline |
|
inline |
|
inline |
|
inline |
LLT<_MatrixType,_UpLo>& Eigen::LLT< _MatrixType, _UpLo >::rankUpdate | ( | const VectorType & | v, |
const RealScalar & | sigma | ||
) |
LLT& Eigen::LLT< _MatrixType, _UpLo >::rankUpdate | ( | const VectorType & | vec, |
const RealScalar & | sigma = 1 |
||
) |
|
inline |
MatrixType Eigen::LLT< MatrixType, _UpLo >::reconstructedMatrix |
|
inline |
void Eigen::LLT< MatrixType, _UpLo >::solveInPlace | ( | const MatrixBase< Derived > & | bAndX | ) | const |
|
friend |
|
protected |
|
protected |
|
protected |
|
protected |