![]() |
Prusa Slicer 2.6.0
|
Standard Cholesky decomposition (LL^T) of a matrix and associated features. More...
#include <src/eigen/Eigen/src/Cholesky/LLT.h>
Collaboration diagram for Eigen::LLT< _MatrixType, _UpLo >:Public Types | |
| enum | { RowsAtCompileTime = MatrixType::RowsAtCompileTime , ColsAtCompileTime = MatrixType::ColsAtCompileTime , MaxColsAtCompileTime = MatrixType::MaxColsAtCompileTime } |
| enum | { PacketSize = internal::packet_traits<Scalar>::size , AlignmentMask = int(PacketSize)-1 , UpLo = _UpLo } |
| typedef _MatrixType | MatrixType |
| typedef MatrixType::Scalar | Scalar |
| typedef NumTraits< typenameMatrixType::Scalar >::Real | RealScalar |
| typedef Eigen::Index | Index |
| typedef MatrixType::StorageIndex | StorageIndex |
| typedef internal::LLT_Traits< MatrixType, UpLo > | Traits |
Public Member Functions | |
| LLT () | |
| Default Constructor. | |
| LLT (Index size) | |
| Default Constructor with memory preallocation. | |
| template<typename InputType > | |
| LLT (const EigenBase< InputType > &matrix) | |
| template<typename InputType > | |
| LLT (EigenBase< InputType > &matrix) | |
| Constructs a LDLT factorization from a given matrix. | |
| Traits::MatrixU | matrixU () const |
| Traits::MatrixL | matrixL () const |
| template<typename Rhs > | |
| const Solve< LLT, Rhs > | solve (const MatrixBase< Rhs > &b) const |
| template<typename Derived > | |
| void | solveInPlace (const MatrixBase< Derived > &bAndX) const |
| template<typename InputType > | |
| LLT & | compute (const EigenBase< InputType > &matrix) |
| RealScalar | rcond () const |
| const MatrixType & | matrixLLT () const |
| MatrixType | reconstructedMatrix () const |
| ComputationInfo | info () const |
| Reports whether previous computation was successful. | |
| const LLT & | adjoint () const |
| Index | rows () const |
| Index | cols () const |
| template<typename VectorType > | |
| LLT | rankUpdate (const VectorType &vec, const RealScalar &sigma=1) |
| template<typename RhsType , typename DstType > | |
| EIGEN_DEVICE_FUNC void | _solve_impl (const RhsType &rhs, DstType &dst) const |
| template<typename InputType > | |
| LLT< MatrixType, _UpLo > & | compute (const EigenBase< InputType > &a) |
| template<typename VectorType > | |
| LLT< _MatrixType, _UpLo > | rankUpdate (const VectorType &v, const RealScalar &sigma) |
| template<typename RhsType , typename DstType > | |
| void | _solve_impl (const RhsType &rhs, DstType &dst) const |
Static Protected Member Functions | |
| static void | check_template_parameters () |
Protected Attributes | |
| MatrixType | m_matrix |
| RealScalar | m_l1_norm |
| bool | m_isInitialized |
| ComputationInfo | m_info |
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 Eigen::Index Eigen::LLT< _MatrixType, _UpLo >::Index |
| typedef _MatrixType Eigen::LLT< _MatrixType, _UpLo >::MatrixType |
| typedef NumTraits<typenameMatrixType::Scalar>::Real Eigen::LLT< _MatrixType, _UpLo >::RealScalar |
| typedef MatrixType::Scalar Eigen::LLT< _MatrixType, _UpLo >::Scalar |
| typedef MatrixType::StorageIndex Eigen::LLT< _MatrixType, _UpLo >::StorageIndex |
| typedef internal::LLT_Traits<MatrixType,UpLo> Eigen::LLT< _MatrixType, _UpLo >::Traits |
| anonymous enum |
| Enumerator | |
|---|---|
| RowsAtCompileTime | |
| ColsAtCompileTime | |
| MaxColsAtCompileTime | |
| anonymous enum |
| Enumerator | |
|---|---|
| PacketSize | |
| AlignmentMask | |
| UpLo | |
|
inline |
Default Constructor.
The default constructor is useful in cases in which the user intends to perform decompositions via LLT::compute(const MatrixType&).
|
inlineexplicit |
|
inlineexplicit |
References Eigen::LLT< _MatrixType, _UpLo >::compute(), and Eigen::EigenBase< Derived >::derived().
Here is the call graph for this function:
|
inlineexplicit |
Constructs a LDLT factorization from a given matrix.
This overloaded constructor is provided for inplace decomposition when MatrixType is a Eigen::Ref.
References Eigen::LLT< _MatrixType, _UpLo >::compute(), and Eigen::EigenBase< Derived >::derived().
Here is the call graph for this function:| EIGEN_DEVICE_FUNC void Eigen::LLT< _MatrixType, _UpLo >::_solve_impl | ( | const RhsType & | rhs, |
| DstType & | dst | ||
| ) | const |
| void Eigen::LLT< _MatrixType, _UpLo >::_solve_impl | ( | 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 |
References EIGEN_STATIC_ASSERT_NON_INTEGER.
|
inline |
References Eigen::LLT< _MatrixType, _UpLo >::m_matrix.
| 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:
References col(), eigen_assert, Eigen::internal::is_same_dense(), Eigen::Lower, Eigen::NumericalIssue, and Eigen::Success.
Here is the call graph for this function:| LLT & Eigen::LLT< _MatrixType, _UpLo >::compute | ( | const EigenBase< InputType > & | matrix | ) |
Referenced by Eigen::LLT< _MatrixType, _UpLo >::LLT(), Eigen::LLT< _MatrixType, _UpLo >::LLT(), and igl::copyleft::quadprog().
Here is the caller graph for this function:
|
inline |
Reports whether previous computation was successful.
Success if computation was succesful, NumericalIssue if the matrix.appears not to be positive definite. References eigen_assert, Eigen::LLT< _MatrixType, _UpLo >::m_info, and Eigen::LLT< _MatrixType, _UpLo >::m_isInitialized.
|
inline |
References eigen_assert, Eigen::LLT< _MatrixType, _UpLo >::m_isInitialized, and Eigen::LLT< _MatrixType, _UpLo >::m_matrix.
Referenced by Eigen::GeneralizedSelfAdjointEigenSolver< _MatrixType >::compute().
Here is the caller graph for this function:
|
inline |
TODO: document the storage layout
References eigen_assert, Eigen::LLT< _MatrixType, _UpLo >::m_isInitialized, and Eigen::LLT< _MatrixType, _UpLo >::m_matrix.
|
inline |
References eigen_assert, Eigen::LLT< _MatrixType, _UpLo >::m_isInitialized, and Eigen::LLT< _MatrixType, _UpLo >::m_matrix.
Referenced by Eigen::GeneralizedSelfAdjointEigenSolver< _MatrixType >::compute(), and igl::copyleft::quadprog().
Here is the caller graph for this function:| LLT< _MatrixType, _UpLo > Eigen::LLT< _MatrixType, _UpLo >::rankUpdate | ( | const VectorType & | v, |
| const RealScalar & | sigma | ||
| ) |
Performs a rank one update (or dowdate) of the current decomposition. If A = LL^* before the rank one update, then after it we have LL^* = A + sigma * v v^* where v must be a vector of same dimension.
References eigen_assert, EIGEN_STATIC_ASSERT_VECTOR_ONLY, Eigen::NumericalIssue, and Eigen::Success.
| LLT Eigen::LLT< _MatrixType, _UpLo >::rankUpdate | ( | const VectorType & | vec, |
| const RealScalar & | sigma = 1 |
||
| ) |
|
inline |
*this is the Cholesky decomposition. References eigen_assert, Eigen::LLT< _MatrixType, _UpLo >::m_info, Eigen::LLT< _MatrixType, _UpLo >::m_isInitialized, Eigen::LLT< _MatrixType, _UpLo >::m_l1_norm, Eigen::internal::rcond_estimate_helper(), and Eigen::Success.
Here is the call graph for this function:| MatrixType Eigen::LLT< MatrixType, _UpLo >::reconstructedMatrix |
References eigen_assert.
|
inline |
References Eigen::LLT< _MatrixType, _UpLo >::m_matrix.
|
inline |
Since this LLT class assumes anyway that the matrix A is invertible, the solution theoretically exists and is unique regardless of b.
Example:
Output:
References eigen_assert, Eigen::LLT< _MatrixType, _UpLo >::m_isInitialized, and Eigen::LLT< _MatrixType, _UpLo >::m_matrix.
Referenced by igl::copyleft::quadprog().
Here is the caller graph for this function:| void Eigen::LLT< MatrixType, _UpLo >::solveInPlace | ( | const MatrixBase< Derived > & | bAndX | ) | const |
References eigen_assert.
|
protected |
Referenced by Eigen::LLT< _MatrixType, _UpLo >::info(), and Eigen::LLT< _MatrixType, _UpLo >::rcond().
|
protected |
|
protected |
Referenced by Eigen::LLT< _MatrixType, _UpLo >::rcond().
|
protected |