MOAB  4.9.3pre
Eigen::SimplicialCholesky< _MatrixType, _UpLo, _Ordering > Class Template Reference

#include <SimplicialCholesky.h>

Inheritance diagram for Eigen::SimplicialCholesky< _MatrixType, _UpLo, _Ordering >:
Collaboration diagram for Eigen::SimplicialCholesky< _MatrixType, _UpLo, _Ordering >:

List of all members.

Public Types

enum  { UpLo = _UpLo }
typedef _MatrixType MatrixType
typedef SimplicialCholeskyBase
< SimplicialCholesky
Base
typedef MatrixType::Scalar Scalar
typedef MatrixType::RealScalar RealScalar
typedef MatrixType::StorageIndex StorageIndex
typedef SparseMatrix< Scalar,
ColMajor, StorageIndex
CholMatrixType
typedef Matrix< Scalar,
Dynamic, 1 > 
VectorType
typedef internal::traits
< SimplicialCholesky
Traits
typedef internal::traits
< SimplicialLDLT< MatrixType,
UpLo > > 
LDLTTraits
typedef internal::traits
< SimplicialLLT< MatrixType,
UpLo > > 
LLTTraits

Public Member Functions

 SimplicialCholesky ()
 SimplicialCholesky (const MatrixType &matrix)
SimplicialCholeskysetMode (SimplicialCholeskyMode mode)
const VectorType vectorD () const
const CholMatrixType rawMatrix () const
SimplicialCholeskycompute (const MatrixType &matrix)
void analyzePattern (const MatrixType &a)
void factorize (const MatrixType &a)
template<typename Rhs , typename Dest >
void _solve_impl (const MatrixBase< Rhs > &b, MatrixBase< Dest > &dest) const
template<typename Rhs , typename Dest >
void _solve_impl (const SparseMatrixBase< Rhs > &b, SparseMatrixBase< Dest > &dest) const
Scalar determinant () const

Protected Attributes

bool m_LDLT

Detailed Description

template<typename _MatrixType, int _UpLo, typename _Ordering>
class Eigen::SimplicialCholesky< _MatrixType, _UpLo, _Ordering >

Deprecated:
use SimplicialLDLT or class SimplicialLLT
See also:
class SimplicialLDLT, class SimplicialLLT

Definition at line 503 of file SimplicialCholesky.h.


Member Typedef Documentation

template<typename _MatrixType , int _UpLo, typename _Ordering >
typedef SimplicialCholeskyBase<SimplicialCholesky> Eigen::SimplicialCholesky< _MatrixType, _UpLo, _Ordering >::Base
template<typename _MatrixType , int _UpLo, typename _Ordering >
typedef SparseMatrix<Scalar,ColMajor,StorageIndex> Eigen::SimplicialCholesky< _MatrixType, _UpLo, _Ordering >::CholMatrixType
template<typename _MatrixType , int _UpLo, typename _Ordering >
typedef internal::traits<SimplicialLDLT<MatrixType,UpLo> > Eigen::SimplicialCholesky< _MatrixType, _UpLo, _Ordering >::LDLTTraits

Definition at line 515 of file SimplicialCholesky.h.

template<typename _MatrixType , int _UpLo, typename _Ordering >
typedef internal::traits<SimplicialLLT<MatrixType,UpLo> > Eigen::SimplicialCholesky< _MatrixType, _UpLo, _Ordering >::LLTTraits

Definition at line 516 of file SimplicialCholesky.h.

template<typename _MatrixType , int _UpLo, typename _Ordering >
typedef _MatrixType Eigen::SimplicialCholesky< _MatrixType, _UpLo, _Ordering >::MatrixType
template<typename _MatrixType , int _UpLo, typename _Ordering >
typedef MatrixType::RealScalar Eigen::SimplicialCholesky< _MatrixType, _UpLo, _Ordering >::RealScalar
template<typename _MatrixType , int _UpLo, typename _Ordering >
typedef MatrixType::Scalar Eigen::SimplicialCholesky< _MatrixType, _UpLo, _Ordering >::Scalar
template<typename _MatrixType , int _UpLo, typename _Ordering >
typedef MatrixType::StorageIndex Eigen::SimplicialCholesky< _MatrixType, _UpLo, _Ordering >::StorageIndex
template<typename _MatrixType , int _UpLo, typename _Ordering >
typedef internal::traits<SimplicialCholesky> Eigen::SimplicialCholesky< _MatrixType, _UpLo, _Ordering >::Traits

Definition at line 514 of file SimplicialCholesky.h.

template<typename _MatrixType , int _UpLo, typename _Ordering >
typedef Matrix<Scalar,Dynamic,1> Eigen::SimplicialCholesky< _MatrixType, _UpLo, _Ordering >::VectorType

Member Enumeration Documentation

template<typename _MatrixType , int _UpLo, typename _Ordering >
anonymous enum
Enumerator:
UpLo 

Definition at line 507 of file SimplicialCholesky.h.

{ UpLo = _UpLo };

Constructor & Destructor Documentation

template<typename _MatrixType , int _UpLo, typename _Ordering >
Eigen::SimplicialCholesky< _MatrixType, _UpLo, _Ordering >::SimplicialCholesky ( ) [inline]

Definition at line 518 of file SimplicialCholesky.h.

: Base(), m_LDLT(true) {}
template<typename _MatrixType , int _UpLo, typename _Ordering >
Eigen::SimplicialCholesky< _MatrixType, _UpLo, _Ordering >::SimplicialCholesky ( const MatrixType matrix) [inline, explicit]

Definition at line 520 of file SimplicialCholesky.h.

      : Base(), m_LDLT(true)
    {
      compute(matrix);
    }

Member Function Documentation

template<typename _MatrixType , int _UpLo, typename _Ordering >
template<typename Rhs , typename Dest >
void Eigen::SimplicialCholesky< _MatrixType, _UpLo, _Ordering >::_solve_impl ( const MatrixBase< Rhs > &  b,
MatrixBase< Dest > &  dest 
) const [inline]

Reimplemented from Eigen::SimplicialCholeskyBase< SimplicialCholesky< _MatrixType, _UpLo, _Ordering > >.

Definition at line 589 of file SimplicialCholesky.h.

    {
      eigen_assert(Base::m_factorizationIsOk && "The decomposition is not in a valid state for solving, you must first call either compute() or symbolic()/numeric()");
      eigen_assert(Base::m_matrix.rows()==b.rows());

      if(Base::m_info!=Success)
        return;

      if(Base::m_P.size()>0)
        dest = Base::m_P * b;
      else
        dest = b;

      if(Base::m_matrix.nonZeros()>0) // otherwise L==I
      {
        if(m_LDLT)
          LDLTTraits::getL(Base::m_matrix).solveInPlace(dest);
        else
          LLTTraits::getL(Base::m_matrix).solveInPlace(dest);
      }

      if(Base::m_diag.size()>0)
        dest = Base::m_diag.asDiagonal().inverse() * dest;

      if (Base::m_matrix.nonZeros()>0) // otherwise I==I
      {
        if(m_LDLT)
          LDLTTraits::getU(Base::m_matrix).solveInPlace(dest);
        else
          LLTTraits::getU(Base::m_matrix).solveInPlace(dest);
      }

      if(Base::m_P.size()>0)
        dest = Base::m_Pinv * dest;
    }
template<typename _MatrixType , int _UpLo, typename _Ordering >
template<typename Rhs , typename Dest >
void Eigen::SimplicialCholesky< _MatrixType, _UpLo, _Ordering >::_solve_impl ( const SparseMatrixBase< Rhs > &  b,
SparseMatrixBase< Dest > &  dest 
) const [inline]
template<typename _MatrixType , int _UpLo, typename _Ordering >
void Eigen::SimplicialCholesky< _MatrixType, _UpLo, _Ordering >::analyzePattern ( const MatrixType a) [inline]

Performs a symbolic decomposition on the sparcity of matrix.

This function is particularly useful when solving for several problems having the same structure.

See also:
factorize()

Definition at line 568 of file SimplicialCholesky.h.

template<typename _MatrixType , int _UpLo, typename _Ordering >
SimplicialCholesky& Eigen::SimplicialCholesky< _MatrixType, _UpLo, _Ordering >::compute ( const MatrixType matrix) [inline]

Computes the sparse Cholesky decomposition of matrix

Reimplemented from Eigen::SimplicialCholeskyBase< SimplicialCholesky< _MatrixType, _UpLo, _Ordering > >.

Definition at line 553 of file SimplicialCholesky.h.

    {
      if(m_LDLT)
        Base::template compute<true>(matrix);
      else
        Base::template compute<false>(matrix);
      return *this;
    }
template<typename _MatrixType , int _UpLo, typename _Ordering >
Scalar Eigen::SimplicialCholesky< _MatrixType, _UpLo, _Ordering >::determinant ( ) const [inline]

Definition at line 632 of file SimplicialCholesky.h.

    {
      if(m_LDLT)
      {
        return Base::m_diag.prod();
      }
      else
      {
        Scalar detL = Diagonal<const CholMatrixType>(Base::m_matrix).prod();
        return numext::abs2(detL);
      }
    }
template<typename _MatrixType , int _UpLo, typename _Ordering >
void Eigen::SimplicialCholesky< _MatrixType, _UpLo, _Ordering >::factorize ( const MatrixType a) [inline]

Performs a numeric decomposition of matrix

The given matrix must has the same sparcity than the matrix on which the symbolic decomposition has been performed.

See also:
analyzePattern()

Reimplemented from Eigen::SimplicialCholeskyBase< SimplicialCholesky< _MatrixType, _UpLo, _Ordering > >.

Definition at line 579 of file SimplicialCholesky.h.

    {
      if(m_LDLT)
        Base::template factorize<true>(a);
      else
        Base::template factorize<false>(a);
    }
template<typename _MatrixType , int _UpLo, typename _Ordering >
const CholMatrixType Eigen::SimplicialCholesky< _MatrixType, _UpLo, _Ordering >::rawMatrix ( ) const [inline]

Definition at line 547 of file SimplicialCholesky.h.

                                                  {
        eigen_assert(Base::m_factorizationIsOk && "Simplicial Cholesky not factorized");
        return Base::m_matrix;
    }
template<typename _MatrixType , int _UpLo, typename _Ordering >
SimplicialCholesky& Eigen::SimplicialCholesky< _MatrixType, _UpLo, _Ordering >::setMode ( SimplicialCholeskyMode  mode) [inline]

Definition at line 526 of file SimplicialCholesky.h.

    {
      switch(mode)
      {
      case SimplicialCholeskyLLT:
        m_LDLT = false;
        break;
      case SimplicialCholeskyLDLT:
        m_LDLT = true;
        break;
      default:
        break;
      }

      return *this;
    }
template<typename _MatrixType , int _UpLo, typename _Ordering >
const VectorType Eigen::SimplicialCholesky< _MatrixType, _UpLo, _Ordering >::vectorD ( ) const [inline]

Definition at line 543 of file SimplicialCholesky.h.

                                            {
        eigen_assert(Base::m_factorizationIsOk && "Simplicial Cholesky not factorized");
        return Base::m_diag;
    }

Member Data Documentation

template<typename _MatrixType , int _UpLo, typename _Ordering >
bool Eigen::SimplicialCholesky< _MatrixType, _UpLo, _Ordering >::m_LDLT [protected]

Definition at line 646 of file SimplicialCholesky.h.


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