compbio
Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
Eigen::UmfPackLU< _MatrixType > Class Template Reference

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

#include <UmfPackSupport.h>

Inheritance diagram for Eigen::UmfPackLU< _MatrixType >:
Eigen::SparseSolverBase< UmfPackLU< _MatrixType > > Eigen::internal::noncopyable

Public Types

enum  { ColsAtCompileTime = MatrixType::ColsAtCompileTime, MaxColsAtCompileTime = MatrixType::MaxColsAtCompileTime }
 
typedef _MatrixType MatrixType
 
typedef MatrixType::Scalar Scalar
 
typedef MatrixType::RealScalar RealScalar
 
typedef MatrixType::StorageIndex StorageIndex
 
typedef Matrix< Scalar, Dynamic, 1 > Vector
 
typedef Matrix< int, 1, MatrixType::ColsAtCompileTime > IntRowVectorType
 
typedef Matrix< int, MatrixType::RowsAtCompileTime, 1 > IntColVectorType
 
typedef SparseMatrix< Scalar > LUMatrixType
 
typedef SparseMatrix< Scalar, ColMajor, int > UmfpackMatrixType
 
typedef Ref< const UmfpackMatrixType, StandardCompressedFormatUmfpackMatrixRef
 
typedef Array< double, UMFPACK_CONTROL, 1 > UmfpackControl
 

Public Member Functions

template<typename InputMatrixType >
 UmfPackLU (const InputMatrixType &matrix)
 
Index rows () const
 
Index cols () const
 
ComputationInfo info () const
 Reports whether previous computation was successful. More...
 
const LUMatrixTypematrixL () const
 
const LUMatrixTypematrixU () const
 
const IntColVectorTypepermutationP () const
 
const IntRowVectorTypepermutationQ () const
 
template<typename InputMatrixType >
void compute (const InputMatrixType &matrix)
 Computes the sparse Cholesky decomposition of matrix Note that the matrix should be column-major, and in compressed format for best performance. More...
 
template<typename InputMatrixType >
void analyzePattern (const InputMatrixType &matrix)
 Performs a symbolic decomposition on the sparcity of matrix. More...
 
int umfpackFactorizeReturncode () const
 Provides the return status code returned by UmfPack during the numeric factorization. More...
 
const UmfpackControlumfpackControl () const
 Provides access to the control settings array used by UmfPack. More...
 
UmfpackControlumfpackControl ()
 Provides access to the control settings array used by UmfPack. More...
 
template<typename InputMatrixType >
void factorize (const InputMatrixType &matrix)
 Performs a numeric decomposition of matrix. More...
 
template<typename BDerived , typename XDerived >
bool _solve_impl (const MatrixBase< BDerived > &b, MatrixBase< XDerived > &x) const
 
Scalar determinant () const
 
void extractData () const
 
- Public Member Functions inherited from Eigen::SparseSolverBase< UmfPackLU< _MatrixType > >
 SparseSolverBase ()
 Default constructor.
 
UmfPackLU< _MatrixType > & derived ()
 
const UmfPackLU< _MatrixType > & derived () const
 
const Solve< UmfPackLU< _MatrixType >, Rhs > solve (const MatrixBase< Rhs > &b) const
 
const Solve< UmfPackLU< _MatrixType >, Rhs > solve (const SparseMatrixBase< Rhs > &b) const
 
void _solve_impl (const SparseMatrixBase< Rhs > &b, SparseMatrixBase< Dest > &dest) const
 

Protected Types

typedef SparseSolverBase< UmfPackLU< _MatrixType > > Base
 

Protected Member Functions

void init ()
 
void analyzePattern_impl ()
 
void factorize_impl ()
 
template<typename MatrixDerived >
void grab (const EigenBase< MatrixDerived > &A)
 
void grab (const UmfpackMatrixRef &A)
 

Protected Attributes

LUMatrixType m_l
 
int m_fact_errorCode
 
UmfpackControl m_control
 
LUMatrixType m_u
 
IntColVectorType m_p
 
IntRowVectorType m_q
 
UmfpackMatrixType m_dummy
 
UmfpackMatrixRef mp_matrix
 
void * m_numeric
 
void * m_symbolic
 
ComputationInfo m_info
 
int m_factorizationIsOk
 
int m_analysisIsOk
 
bool m_extractedDataAreDirty
 
- Protected Attributes inherited from Eigen::SparseSolverBase< UmfPackLU< _MatrixType > >
bool m_isInitialized
 

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.

Warning
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
Sparse solver concept, class SparseLU

Member Function Documentation

§ analyzePattern()

template<typename _MatrixType>
template<typename InputMatrixType >
void Eigen::UmfPackLU< _MatrixType >::analyzePattern ( const InputMatrixType &  matrix)
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(), compute()

§ compute()

template<typename _MatrixType>
template<typename InputMatrixType >
void Eigen::UmfPackLU< _MatrixType >::compute ( const InputMatrixType &  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().

§ factorize()

template<typename _MatrixType>
template<typename InputMatrixType >
void Eigen::UmfPackLU< _MatrixType >::factorize ( const InputMatrixType &  matrix)
inline

Performs a numeric decomposition of matrix.

The given matrix must has the same sparcity than the matrix on which the pattern anylysis has been performed.

See also
analyzePattern(), compute()

§ info()

template<typename _MatrixType>
ComputationInfo Eigen::UmfPackLU< _MatrixType >::info ( ) const
inline

Reports whether previous computation was successful.

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

§ umfpackControl() [1/2]

template<typename _MatrixType>
const UmfpackControl& Eigen::UmfPackLU< _MatrixType >::umfpackControl ( ) const
inline

Provides access to the control settings array used by UmfPack.

If this array contains NaN's, the default values are used.

See UMFPACK documentation for details.

§ umfpackControl() [2/2]

template<typename _MatrixType>
UmfpackControl& Eigen::UmfPackLU< _MatrixType >::umfpackControl ( )
inline

Provides access to the control settings array used by UmfPack.

If this array contains NaN's, the default values are used.

See UMFPACK documentation for details.

§ umfpackFactorizeReturncode()

template<typename _MatrixType>
int Eigen::UmfPackLU< _MatrixType >::umfpackFactorizeReturncode ( ) const
inline

Provides the return status code returned by UmfPack during the numeric factorization.

See also
factorize(), compute()

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