Main MRPT website > C++ reference
MRPT logo
Public Types | Public Member Functions | Protected Attributes
Eigen::LLT Class Reference

Detailed Description

Standard Cholesky decomposition (LL^T) of a matrix and associated features.

Parameters:
MatrixTypethe type of the matrix of which we are computing the LL^T Cholesky decomposition

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.

See also:
MatrixBase::llt(), class LDLT

List of all members.

Public Types

enum  { RowsAtCompileTime = MatrixType::RowsAtCompileTime, ColsAtCompileTime = MatrixType::ColsAtCompileTime, Options = MatrixType::Options, 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< typename
MatrixType::Scalar >::Real 
RealScalar
typedef MatrixType::Index Index
typedef internal::LLT_Traits
< MatrixType, UpLo > 
Traits

Public Member Functions

 LLT ()
 Default Constructor.
 LLT (Index size)
 Default Constructor with memory preallocation.
 LLT (const MatrixType &matrix)
Traits::MatrixU matrixU () const
Traits::MatrixL matrixL () const
template<typename Rhs >
const internal::solve_retval
< LLT, Rhs > 
solve (const MatrixBase< Rhs > &b) const
template<typename Derived >
void solveInPlace (MatrixBase< Derived > &bAndX) const
LLTcompute (const MatrixType &matrix)
 Computes / recomputes the Cholesky decomposition A = LL^* = U^*U of matrix.
const MatrixTypematrixLLT () const
MatrixType reconstructedMatrix () const
ComputationInfo info () const
 Reports whether previous computation was successful.
Index rows () const
Index cols () const
template<typename VectorType >
void rankUpdate (const VectorType &vec)
 Performs a rank one update of the current decomposition.

Protected Attributes

MatrixType m_matrix
bool m_isInitialized
ComputationInfo m_info

Member Typedef Documentation

typedef MatrixType::Index Eigen::LLT::Index

Definition at line 71 of file Cholesky.

typedef _MatrixType Eigen::LLT::MatrixType

Definition at line 62 of file Cholesky.

typedef NumTraits<typename MatrixType::Scalar>::Real Eigen::LLT::RealScalar

Definition at line 70 of file Cholesky.

typedef MatrixType::Scalar Eigen::LLT::Scalar

Definition at line 69 of file Cholesky.

typedef internal::LLT_Traits<MatrixType,UpLo> Eigen::LLT::Traits

Definition at line 79 of file Cholesky.


Member Enumeration Documentation

anonymous enum
Enumerator:
RowsAtCompileTime 
ColsAtCompileTime 
Options 
MaxColsAtCompileTime 

Definition at line 63 of file Cholesky.

anonymous enum
Enumerator:
PacketSize 
AlignmentMask 
UpLo 

Definition at line 73 of file Cholesky.


Constructor & Destructor Documentation

Eigen::LLT::LLT ( ) [inline]

Default Constructor.

The default constructor is useful in cases in which the user intends to perform decompositions via LLT::compute(const MatrixType&).

Definition at line 87 of file Cholesky.

Eigen::LLT::LLT ( Index  size) [inline]

Default Constructor with memory preallocation.

Like the default constructor but with preallocation of the internal data according to the specified problem size.

See also:
LLT()

Definition at line 95 of file Cholesky.

Eigen::LLT::LLT ( const MatrixType matrix) [inline]

Definition at line 98 of file Cholesky.


Member Function Documentation

Index Eigen::LLT::cols ( ) const [inline]

Definition at line 180 of file Cholesky.

LLT< MatrixType, _UpLo > & Eigen::LLT::compute ( const MatrixType a)

Computes / recomputes the Cholesky decomposition A = LL^* = U^*U of matrix.

Returns:
a reference to *this

Definition at line 342 of file Cholesky.

ComputationInfo Eigen::LLT::info ( ) const [inline]

Reports whether previous computation was successful.

Returns:
Success if computation was succesful, NumericalIssue if the matrix.appears to be negative.

Definition at line 173 of file Cholesky.

Referenced by chol().

Traits::MatrixL Eigen::LLT::matrixL ( ) const [inline]
Returns:
a view of the lower triangular matrix L

Definition at line 113 of file Cholesky.

const MatrixType& Eigen::LLT::matrixLLT ( ) const [inline]
Returns:
the LLT decomposition matrix

TODO: document the storage layout

Definition at line 159 of file Cholesky.

Traits::MatrixU Eigen::LLT::matrixU ( ) const [inline]
Returns:
a view of the upper triangular matrix U

Definition at line 106 of file Cholesky.

Referenced by chol().

template<typename VectorType >
void Eigen::LLT::rankUpdate ( const VectorType &  v)

Performs a rank one update of the current decomposition.

If A = LL^* before the rank one update, then after it we have LL^* = A + vv^* where v must be a vector of same dimension.

Definition at line 364 of file Cholesky.

MatrixType Eigen::LLT::reconstructedMatrix ( ) const
Returns:
the matrix represented by the decomposition, i.e., it returns the product: L L^*. This function is provided for debug purpose.

Definition at line 413 of file Cholesky.

Index Eigen::LLT::rows ( ) const [inline]

Definition at line 179 of file Cholesky.

template<typename Rhs >
const internal::solve_retval<LLT, Rhs> Eigen::LLT::solve ( const MatrixBase< Rhs > &  b) const [inline]
Returns:
the solution x of $ A x = b $ 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()

Definition at line 131 of file Cholesky.

template<typename Derived >
void Eigen::LLT::solveInPlace ( MatrixBase< Derived > &  bAndX) const

Definition at line 401 of file Cholesky.


Member Data Documentation

Definition at line 192 of file Cholesky.

bool Eigen::LLT::m_isInitialized [protected]

Definition at line 191 of file Cholesky.

Definition at line 190 of file Cholesky.




Page generated by Doxygen 1.7.5 for MRPT 0.9.5 SVN: at Thu Oct 13 21:25:36 UTC 2011