Eigne Matrix Class Library
Dependents: Eigen_test Odometry_test AttitudeEstimation_usingTicker MPU9250_Quaternion_Binary_Serial ... more
LLT< _MatrixType, _UpLo > Class Template Reference
[Cholesky module]
Standard Cholesky decomposition (LL^T) of a matrix and associated features. More...
#include <LLT.h>
Public Member Functions | |
LLT () | |
Default Constructor. | |
LLT (Index size) | |
Default Constructor with memory preallocation. | |
Traits::MatrixU | matrixU () const |
Traits::MatrixL | matrixL () const |
template<typename Rhs > | |
const internal::solve_retval < LLT, Rhs > | solve (const MatrixBase< Rhs > &b) const |
LLT & | compute (const MatrixType &matrix) |
Computes / recomputes the Cholesky decomposition A = LL^* = U^*U of matrix. | |
const MatrixType & | matrixLLT () const |
MatrixType | reconstructedMatrix () const |
ComputationInfo | info () const |
Reports whether previous computation was successful. | |
template<typename VectorType > | |
LLT | rankUpdate (const VectorType &vec, const RealScalar &sigma=1) |
Performs a rank one update (or dowdate) of the current decomposition. |
Detailed Description
template<typename _MatrixType, int _UpLo>
class Eigen::LLT< _MatrixType, _UpLo >
Standard Cholesky decomposition (LL^T) of a matrix and associated features.
- 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 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:
- See also:
- MatrixBase::llt(), class LDLT
Definition at line 50 of file LLT.h.
Constructor & Destructor Documentation
LLT | ( | ) |
Default Constructor.
The default constructor is useful in cases in which the user intends to perform decompositions via LLT::compute(const MatrixType&).
LLT | ( | Index | size ) |
Member Function Documentation
LLT< MatrixType, _UpLo > & compute | ( | const MatrixType & | a ) |
ComputationInfo info | ( | ) | const |
Traits::MatrixL matrixL | ( | ) | const |
const MatrixType& matrixLLT | ( | ) | const |
Traits::MatrixU matrixU | ( | ) | const |
LLT< _MatrixType, _UpLo > rankUpdate | ( | const VectorType & | v, |
const RealScalar & | sigma = 1 |
||
) |
MatrixType reconstructedMatrix | ( | ) | const |
const internal::solve_retval<LLT, Rhs> solve | ( | const MatrixBase< Rhs > & | b ) | const |
- Returns:
- the solution x of using the current decomposition of A.
Since this LLT class assumes anyway that the matrix A is invertible, the solution theoretically exists and is unique regardless of b.
Example:
Output:
- See also:
- solveInPlace(), MatrixBase::llt()
Generated on Tue Jul 12 2022 17:47:03 by 1.7.2