A sparse LU factorization and solver based on UmfPack. More...
#include <UmfPackSupport.h>
Public Types | |
typedef MatrixType::Index | Index |
typedef Matrix< int, MatrixType::RowsAtCompileTime, 1 > | IntColVectorType |
typedef Matrix< int, 1, MatrixType::ColsAtCompileTime > | IntRowVectorType |
typedef SparseMatrix< Scalar > | LUMatrixType |
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 | |
template<typename BDerived , typename XDerived > | |
bool | _solve (const MatrixBase< BDerived > &b, MatrixBase< XDerived > &x) const |
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 LUMatrixType & | matrixL () const |
const LUMatrixType & | matrixU () const |
const IntColVectorType & | permutationP () const |
const IntRowVectorType & | permutationQ () 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 int * | m_innerIndexPtr |
bool | m_isInitialized |
LUMatrixType | m_l |
void * | m_numeric |
const int * | m_outerIndexPtr |
IntColVectorType | m_p |
IntRowVectorType | m_q |
void * | m_symbolic |
LUMatrixType | m_u |
const Scalar * | m_valuePtr |
Private Member Functions | |
UmfPackLU (UmfPackLU &) |
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.
_MatrixType | the type of the sparse matrix A, it must be a SparseMatrix<> |
Definition at line 124 of file UmfPackSupport.h.
typedef MatrixType::Index Eigen::UmfPackLU< _MatrixType >::Index |
Definition at line 130 of file UmfPackSupport.h.
typedef Matrix<int, MatrixType::RowsAtCompileTime, 1> Eigen::UmfPackLU< _MatrixType >::IntColVectorType |
Definition at line 133 of file UmfPackSupport.h.
typedef Matrix<int, 1, MatrixType::ColsAtCompileTime> Eigen::UmfPackLU< _MatrixType >::IntRowVectorType |
Definition at line 132 of file UmfPackSupport.h.
typedef SparseMatrix<Scalar> Eigen::UmfPackLU< _MatrixType >::LUMatrixType |
Definition at line 134 of file UmfPackSupport.h.
typedef _MatrixType Eigen::UmfPackLU< _MatrixType >::MatrixType |
Definition at line 127 of file UmfPackSupport.h.
typedef MatrixType::RealScalar Eigen::UmfPackLU< _MatrixType >::RealScalar |
Definition at line 129 of file UmfPackSupport.h.
typedef MatrixType::Scalar Eigen::UmfPackLU< _MatrixType >::Scalar |
Definition at line 128 of file UmfPackSupport.h.
typedef SparseMatrix<Scalar,ColMajor,int> Eigen::UmfPackLU< _MatrixType >::UmfpackMatrixType |
Definition at line 135 of file UmfPackSupport.h.
typedef Matrix<Scalar,Dynamic,1> Eigen::UmfPackLU< _MatrixType >::Vector |
Definition at line 131 of file UmfPackSupport.h.
Eigen::UmfPackLU< _MatrixType >::UmfPackLU | ( | ) | [inline] |
Definition at line 139 of file UmfPackSupport.h.
Eigen::UmfPackLU< _MatrixType >::UmfPackLU | ( | const MatrixType & | matrix | ) | [inline] |
Definition at line 141 of file UmfPackSupport.h.
Eigen::UmfPackLU< _MatrixType >::~UmfPackLU | ( | ) | [inline] |
Definition at line 147 of file UmfPackSupport.h.
Eigen::UmfPackLU< _MatrixType >::UmfPackLU | ( | UmfPackLU< _MatrixType > & | ) | [inline, private] |
Definition at line 337 of file UmfPackSupport.h.
bool Eigen::UmfPackLU< MatrixType >::_solve | ( | const MatrixBase< BDerived > & | b, |
MatrixBase< XDerived > & | x | ||
) | const |
Definition at line 379 of file UmfPackSupport.h.
void Eigen::UmfPackLU< _MatrixType >::analyzePattern | ( | const MatrixType & | matrix | ) | [inline] |
This function is particularly useful when solving for several problems having the same structure.
Definition at line 233 of file UmfPackSupport.h.
Index Eigen::UmfPackLU< _MatrixType >::cols | ( | void | ) | const [inline] |
Definition at line 154 of file UmfPackSupport.h.
void Eigen::UmfPackLU< _MatrixType >::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.
Definition at line 195 of file UmfPackSupport.h.
UmfPackLU< MatrixType >::Scalar Eigen::UmfPackLU< MatrixType >::determinant | ( | ) | const |
Definition at line 370 of file UmfPackSupport.h.
void Eigen::UmfPackLU< MatrixType >::extractData | ( | ) | const |
Definition at line 342 of file UmfPackSupport.h.
void Eigen::UmfPackLU< _MatrixType >::factorize | ( | const MatrixType & | 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.
Definition at line 258 of file UmfPackSupport.h.
void Eigen::UmfPackLU< _MatrixType >::grapInput | ( | const MatrixType & | mat | ) | [inline, protected] |
Definition at line 298 of file UmfPackSupport.h.
ComputationInfo Eigen::UmfPackLU< _MatrixType >::info | ( | ) | const [inline] |
Reports whether previous computation was successful.
Success
if computation was succesful, NumericalIssue
if the matrix.appears to be negative. Definition at line 161 of file UmfPackSupport.h.
void Eigen::UmfPackLU< _MatrixType >::init | ( | ) | [inline, protected] |
Definition at line 287 of file UmfPackSupport.h.
const LUMatrixType& Eigen::UmfPackLU< _MatrixType >::matrixL | ( | ) | const [inline] |
Definition at line 167 of file UmfPackSupport.h.
const LUMatrixType& Eigen::UmfPackLU< _MatrixType >::matrixU | ( | ) | const [inline] |
Definition at line 173 of file UmfPackSupport.h.
const IntColVectorType& Eigen::UmfPackLU< _MatrixType >::permutationP | ( | ) | const [inline] |
Definition at line 179 of file UmfPackSupport.h.
const IntRowVectorType& Eigen::UmfPackLU< _MatrixType >::permutationQ | ( | ) | const [inline] |
Definition at line 185 of file UmfPackSupport.h.
Index Eigen::UmfPackLU< _MatrixType >::rows | ( | void | ) | const [inline] |
Definition at line 153 of file UmfPackSupport.h.
const internal::solve_retval<UmfPackLU, Rhs> Eigen::UmfPackLU< _MatrixType >::solve | ( | const MatrixBase< Rhs > & | b | ) | const [inline] |
Definition at line 206 of file UmfPackSupport.h.
int Eigen::UmfPackLU< _MatrixType >::m_analysisIsOk [protected] |
Definition at line 333 of file UmfPackSupport.h.
UmfpackMatrixType Eigen::UmfPackLU< _MatrixType >::m_copyMatrix [protected] |
Definition at line 323 of file UmfPackSupport.h.
bool Eigen::UmfPackLU< _MatrixType >::m_extractedDataAreDirty [mutable, protected] |
Definition at line 334 of file UmfPackSupport.h.
int Eigen::UmfPackLU< _MatrixType >::m_factorizationIsOk [protected] |
Definition at line 332 of file UmfPackSupport.h.
ComputationInfo Eigen::UmfPackLU< _MatrixType >::m_info [mutable, protected] |
Definition at line 330 of file UmfPackSupport.h.
const int* Eigen::UmfPackLU< _MatrixType >::m_innerIndexPtr [protected] |
Definition at line 326 of file UmfPackSupport.h.
bool Eigen::UmfPackLU< _MatrixType >::m_isInitialized [protected] |
Definition at line 331 of file UmfPackSupport.h.
LUMatrixType Eigen::UmfPackLU< _MatrixType >::m_l [mutable, protected] |
Definition at line 318 of file UmfPackSupport.h.
void* Eigen::UmfPackLU< _MatrixType >::m_numeric [protected] |
Definition at line 327 of file UmfPackSupport.h.
const int* Eigen::UmfPackLU< _MatrixType >::m_outerIndexPtr [protected] |
Definition at line 325 of file UmfPackSupport.h.
IntColVectorType Eigen::UmfPackLU< _MatrixType >::m_p [mutable, protected] |
Definition at line 320 of file UmfPackSupport.h.
IntRowVectorType Eigen::UmfPackLU< _MatrixType >::m_q [mutable, protected] |
Definition at line 321 of file UmfPackSupport.h.
void* Eigen::UmfPackLU< _MatrixType >::m_symbolic [protected] |
Definition at line 328 of file UmfPackSupport.h.
LUMatrixType Eigen::UmfPackLU< _MatrixType >::m_u [mutable, protected] |
Definition at line 319 of file UmfPackSupport.h.
const Scalar* Eigen::UmfPackLU< _MatrixType >::m_valuePtr [protected] |
Definition at line 324 of file UmfPackSupport.h.