OSVR-Core
Public Types | Public Member Functions | 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::internal::noncopyable

Public Types

typedef _MatrixType MatrixType
 
typedef MatrixType::Scalar Scalar
 
typedef MatrixType::RealScalar RealScalar
 
typedef MatrixType::Index Index
 
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
 

Public Member Functions

 UmfPackLU (const MatrixType &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 Rhs >
const internal::solve_retval< UmfPackLU, Rhs > solve (const MatrixBase< Rhs > &b) const
 
template<typename Rhs >
const internal::sparse_solve_retval< UmfPackLU, Rhs > solve (const SparseMatrixBase< Rhs > &b) const
 
template<typename InputMatrixType >
void analyzePattern (const InputMatrixType &matrix)
 Performs a symbolic decomposition on the sparcity of matrix. More...
 
template<typename InputMatrixType >
void factorize (const InputMatrixType &matrix)
 Performs a numeric decomposition of matrix. More...
 
template<typename BDerived , typename XDerived >
bool _solve (const MatrixBase< BDerived > &b, MatrixBase< XDerived > &x) const
 
Scalar determinant () const
 
void extractData () const
 

Protected Member Functions

void init ()
 
template<typename InputMatrixType >
void grapInput_impl (const InputMatrixType &mat, internal::true_type)
 
template<typename InputMatrixType >
void grapInput_impl (const InputMatrixType &mat, internal::false_type)
 
template<typename InputMatrixType >
void grapInput (const InputMatrixType &mat)
 
void analyzePattern_impl ()
 
void factorize_impl ()
 

Protected Attributes

LUMatrixType m_l
 
LUMatrixType m_u
 
IntColVectorType m_p
 
IntRowVectorType m_q
 
UmfpackMatrixType m_copyMatrix
 
const Scalar * m_valuePtr
 
const int * m_outerIndexPtr
 
const int * m_innerIndexPtr
 
void * m_numeric
 
void * m_symbolic
 
ComputationInfo m_info
 
bool m_isInitialized
 
int m_factorizationIsOk
 
int m_analysisIsOk
 
bool m_extractedDataAreDirty
 

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 solvers

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.

§ solve() [1/2]

template<typename _MatrixType>
template<typename Rhs >
const internal::solve_retval<UmfPackLU, Rhs> Eigen::UmfPackLU< _MatrixType >::solve ( const MatrixBase< Rhs > &  b) const
inline
Returns
the solution x of \( A x = b \) using the current decomposition of A.
See also
compute()

§ solve() [2/2]

template<typename _MatrixType>
template<typename Rhs >
const internal::sparse_solve_retval<UmfPackLU, Rhs> Eigen::UmfPackLU< _MatrixType >::solve ( const SparseMatrixBase< Rhs > &  b) const
inline
Returns
the solution x of \( A x = b \) using the current decomposition of A.
See also
compute()

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