Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
UmfPackLU< _MatrixType > Class Template Reference

A sparse LU factorization and solver based on UmfPack. More...

#include <UmfPackSupport.h>

Inherits noncopyable.

List of all members.

Public Types

typedef MatrixType::Index Index
typedef Matrix< int,
MatrixType::RowsAtCompileTime, 1 > 
IntColVectorType
typedef Matrix< int,
1, MatrixType::ColsAtCompileTime > 
IntRowVectorType
typedef SparseMatrix< ScalarLUMatrixType
typedef _MatrixType MatrixType
typedef MatrixType::RealScalar RealScalar
typedef MatrixType::Scalar Scalar
typedef SparseMatrix< Scalar,
ColMajor, int
UmfpackMatrixType
typedef Matrix< Scalar,
Dynamic, 1 > 
Vector

Public Member Functions

void analyzePattern (const MatrixType &matrix)
Index cols () const
void compute (const MatrixType &matrix)
Scalar determinant () const
void extractData () const
void factorize (const MatrixType &matrix)
ComputationInfo info () const
 Reports whether previous computation was successful.
const LUMatrixTypematrixL () const
const LUMatrixTypematrixU () const
const IntColVectorTypepermutationP () const
const IntRowVectorTypepermutationQ () const
Index rows () const
template<typename Rhs >
const internal::solve_retval
< UmfPackLU, Rhs > 
solve (const MatrixBase< Rhs > &b) const
 UmfPackLU ()
 UmfPackLU (const MatrixType &matrix)
 ~UmfPackLU ()

Protected Member Functions

void grapInput (const MatrixType &mat)
void init ()

Protected Attributes

int m_analysisIsOk
UmfpackMatrixType m_copyMatrix
bool m_extractedDataAreDirty
int m_factorizationIsOk
ComputationInfo m_info
const intm_innerIndexPtr
bool m_isInitialized
LUMatrixType m_l
void * m_numeric
const intm_outerIndexPtr
IntColVectorType m_p
IntRowVectorType m_q
void * m_symbolic
LUMatrixType m_u
const Scalarm_valuePtr

Detailed Description

template<typename _MatrixType>
class Eigen::UmfPackLU< _MatrixType >

A sparse LU factorization and solver based on UmfPack.

This class allows to solve for A.X = B sparse linear problems via a LU factorization using the UmfPack library. The sparse matrix A must be squared and full rank. The vectors or matrices X and B can be either dense or sparse.

The input matrix A should be in a compressed and column-major form. Otherwise an expensive copy will be made. You can call the inexpensive makeCompressed() to get a compressed matrix.

Template Parameters:
_MatrixTypethe type of the sparse matrix A, it must be a SparseMatrix<>
See also:
Solving linear problems

Member Typedef Documentation

typedef MatrixType::Index Index
typedef Matrix<int, MatrixType::RowsAtCompileTime, 1> IntColVectorType
typedef Matrix<int, 1, MatrixType::ColsAtCompileTime> IntRowVectorType
typedef _MatrixType MatrixType
typedef MatrixType::RealScalar RealScalar
typedef MatrixType::Scalar Scalar

Constructor & Destructor Documentation

UmfPackLU ( ) [inline]
UmfPackLU ( const MatrixType matrix) [inline]
~UmfPackLU ( ) [inline]

Member Function Documentation

void analyzePattern ( const MatrixType matrix) [inline]
Index cols ( void  ) const [inline]
void compute ( const MatrixType matrix) [inline]

Computes the sparse Cholesky decomposition of matrix Note that the matrix should be column-major, and in compressed format for best performance.

See also:
SparseMatrix::makeCompressed().

References UmfPackLU< _MatrixType >::analyzePattern(), and UmfPackLU< _MatrixType >::factorize().

Referenced by UmfPackLU< _MatrixType >::UmfPackLU().

void extractData ( ) const
void factorize ( const MatrixType matrix) [inline]
void grapInput ( const MatrixType mat) [inline, protected]
ComputationInfo info ( ) const [inline]

Reports whether previous computation was successful.

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

References UmfPackLU< _MatrixType >::m_info, and UmfPackLU< _MatrixType >::m_isInitialized.

void init ( ) [inline, protected]
const LUMatrixType& matrixL ( ) const [inline]
const LUMatrixType& matrixU ( ) const [inline]
const IntColVectorType& permutationP ( ) const [inline]
const IntRowVectorType& permutationQ ( ) const [inline]
Index rows ( void  ) const [inline]
const internal::solve_retval<UmfPackLU, Rhs> solve ( const MatrixBase< Rhs > &  b) const [inline]
Returns:
the solution x of $ A x = b $ using the current decomposition of A.
See also:
compute()

References UmfPackLU< _MatrixType >::m_isInitialized, and UmfPackLU< _MatrixType >::rows().


Member Data Documentation

int m_analysisIsOk [protected]
bool m_extractedDataAreDirty [mutable, protected]
int m_factorizationIsOk [protected]
ComputationInfo m_info [mutable, protected]
const int* m_innerIndexPtr [protected]
bool m_isInitialized [protected]
LUMatrixType m_l [mutable, protected]
void* m_numeric [protected]
const int* m_outerIndexPtr [protected]
IntColVectorType m_p [mutable, protected]
IntRowVectorType m_q [mutable, protected]
void* m_symbolic [protected]
LUMatrixType m_u [mutable, protected]
const Scalar* m_valuePtr [protected]

The documentation for this class was generated from the following file: