LLT< MatrixType > Class Template Reference

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

#include <LLT.h>

List of all members.

Public Member Functions

void compute (const MatrixType &matrix)
bool isPositiveDefinite (void) const
 LLT (const MatrixType &matrix)
 LLT ()
 Default Constructor.
Part< MatrixType, LowerTriangularmatrixL (void) const
template<typename RhsDerived , typename ResultType >
bool solve (const MatrixBase< RhsDerived > &b, ResultType *result) const
template<typename Derived >
bool solveInPlace (MatrixBase< Derived > &bAndX) const

Protected Attributes

bool m_isInitialized
bool m_isPositiveDefinite
MatrixType m_matrix

Private Types

enum  { PacketSize = ei_packet_traits<Scalar>::size, AlignmentMask = int(PacketSize)-1 }
typedef NumTraits< typename
MatrixType::Scalar >::Real 
RealScalar
typedef MatrixType::Scalar Scalar
typedef Matrix< Scalar,
MatrixType::ColsAtCompileTime, 1 > 
VectorType

Detailed Description

template<typename MatrixType>
class LLT< MatrixType >

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

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

Definition at line 54 of file LLT.h.


Member Typedef Documentation

template<typename MatrixType>
typedef NumTraits<typename MatrixType::Scalar>::Real LLT< MatrixType >::RealScalar [private]

Definition at line 58 of file LLT.h.

template<typename MatrixType>
typedef MatrixType::Scalar LLT< MatrixType >::Scalar [private]

Definition at line 57 of file LLT.h.

template<typename MatrixType>
typedef Matrix<Scalar, MatrixType::ColsAtCompileTime, 1> LLT< MatrixType >::VectorType [private]

Definition at line 59 of file LLT.h.


Member Enumeration Documentation

template<typename MatrixType>
anonymous enum [private]
Enumerator:
PacketSize 
AlignmentMask 

Definition at line 61 of file LLT.h.


Constructor & Destructor Documentation

template<typename MatrixType>
LLT< MatrixType >::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 74 of file LLT.h.

template<typename MatrixType>
LLT< MatrixType >::LLT ( const MatrixType &  matrix  )  [inline]

Definition at line 76 of file LLT.h.


Member Function Documentation

template<typename MatrixType >
void LLT< MatrixType >::compute ( const MatrixType &  a  )  [inline]

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

Definition at line 114 of file LLT.h.

template<typename MatrixType>
bool LLT< MatrixType >::isPositiveDefinite ( void   )  const [inline]
Deprecated:

Definition at line 91 of file LLT.h.

template<typename MatrixType>
Part<MatrixType, LowerTriangular> LLT< MatrixType >::matrixL ( void   )  const [inline]
Returns:
the lower triangular matrix L

Definition at line 84 of file LLT.h.

template<typename MatrixType >
template<typename RhsDerived , typename ResultType >
bool LLT< MatrixType >::solve ( const MatrixBase< RhsDerived > &  b,
ResultType *  result 
) const [inline]

Computes the solution x of $ A x = b $ using the current decomposition of A. The result is stored in result

Returns:
true always! If you need to check for existence of solutions, use another decomposition like LU, QR, or SVD.

In other words, it computes $ b = A^{-1} b $ with $ {L^{*}}^{-1} L^{-1} b $ from right to left.

Example:

Output:

See also:
LLT::solveInPlace(), MatrixBase::llt()

Definition at line 179 of file LLT.h.

template<typename MatrixType >
template<typename Derived >
bool LLT< MatrixType >::solveInPlace ( MatrixBase< Derived > &  bAndX  )  const [inline]

This is the in-place version of solve().

Parameters:
bAndX represents both the right-hand side matrix b and result x.
Returns:
true always! If you need to check for existence of solutions, use another decomposition like LU, QR, or SVD.

This version avoids a copy when the right hand side matrix b is not needed anymore.

See also:
LLT::solve(), MatrixBase::llt()

Definition at line 200 of file LLT.h.


Member Data Documentation

template<typename MatrixType>
bool LLT< MatrixType >::m_isInitialized [protected]

Definition at line 107 of file LLT.h.

template<typename MatrixType>
bool LLT< MatrixType >::m_isPositiveDefinite [protected]

Definition at line 108 of file LLT.h.

template<typename MatrixType>
MatrixType LLT< MatrixType >::m_matrix [protected]

Definition at line 106 of file LLT.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


vcglib
Author(s): Christian Bersch
autogenerated on Fri Jan 11 09:22:05 2013