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 |
template<typename InputMatrixType > | |
void | analyzePattern (const InputMatrixType &matrix) |
Index | cols () const |
template<typename InputMatrixType > | |
void | compute (const InputMatrixType &matrix) |
Scalar | determinant () const |
void | extractData () const |
template<typename InputMatrixType > | |
void | factorize (const InputMatrixType &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 |
template<typename Rhs > | |
const internal::sparse_solve_retval < UmfPackLU, Rhs > | solve (const SparseMatrixBase< Rhs > &b) const |
UmfPackLU () | |
UmfPackLU (const MatrixType &matrix) | |
~UmfPackLU () | |
Protected Member Functions | |
void | analyzePattern_impl () |
void | factorize_impl () |
template<typename InputMatrixType > | |
void | grapInput (const InputMatrixType &mat) |
template<typename InputMatrixType > | |
void | grapInput_impl (const InputMatrixType &mat, internal::true_type) |
template<typename InputMatrixType > | |
void | grapInput_impl (const InputMatrixType &mat, internal::false_type) |
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.
_MatrixType | the type of the sparse matrix A, it must be a SparseMatrix<> |
Definition at line 134 of file UmfPackSupport.h.
typedef MatrixType::Index Eigen::UmfPackLU< _MatrixType >::Index |
Definition at line 140 of file UmfPackSupport.h.
typedef Matrix<int, MatrixType::RowsAtCompileTime, 1> Eigen::UmfPackLU< _MatrixType >::IntColVectorType |
Definition at line 143 of file UmfPackSupport.h.
typedef Matrix<int, 1, MatrixType::ColsAtCompileTime> Eigen::UmfPackLU< _MatrixType >::IntRowVectorType |
Definition at line 142 of file UmfPackSupport.h.
typedef SparseMatrix<Scalar> Eigen::UmfPackLU< _MatrixType >::LUMatrixType |
Definition at line 144 of file UmfPackSupport.h.
typedef _MatrixType Eigen::UmfPackLU< _MatrixType >::MatrixType |
Definition at line 137 of file UmfPackSupport.h.
typedef MatrixType::RealScalar Eigen::UmfPackLU< _MatrixType >::RealScalar |
Definition at line 139 of file UmfPackSupport.h.
typedef MatrixType::Scalar Eigen::UmfPackLU< _MatrixType >::Scalar |
Definition at line 138 of file UmfPackSupport.h.
typedef SparseMatrix<Scalar,ColMajor,int> Eigen::UmfPackLU< _MatrixType >::UmfpackMatrixType |
Definition at line 145 of file UmfPackSupport.h.
typedef Matrix<Scalar,Dynamic,1> Eigen::UmfPackLU< _MatrixType >::Vector |
Definition at line 141 of file UmfPackSupport.h.
Eigen::UmfPackLU< _MatrixType >::UmfPackLU | ( | ) | [inline] |
Definition at line 149 of file UmfPackSupport.h.
Eigen::UmfPackLU< _MatrixType >::UmfPackLU | ( | const MatrixType & | matrix | ) | [inline] |
Definition at line 151 of file UmfPackSupport.h.
Eigen::UmfPackLU< _MatrixType >::~UmfPackLU | ( | ) | [inline] |
Definition at line 157 of file UmfPackSupport.h.
Eigen::UmfPackLU< _MatrixType >::UmfPackLU | ( | UmfPackLU< _MatrixType > & | ) | [inline, private] |
Definition at line 379 of file UmfPackSupport.h.
bool Eigen::UmfPackLU< MatrixType >::_solve | ( | const MatrixBase< BDerived > & | b, |
MatrixBase< XDerived > & | x | ||
) | const |
Definition at line 421 of file UmfPackSupport.h.
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.
Definition at line 248 of file UmfPackSupport.h.
void Eigen::UmfPackLU< _MatrixType >::analyzePattern_impl | ( | ) | [inline, protected] |
Definition at line 335 of file UmfPackSupport.h.
Index Eigen::UmfPackLU< _MatrixType >::cols | ( | void | ) | const [inline] |
Definition at line 164 of file UmfPackSupport.h.
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.
Definition at line 206 of file UmfPackSupport.h.
UmfPackLU< MatrixType >::Scalar Eigen::UmfPackLU< MatrixType >::determinant | ( | ) | const |
Definition at line 412 of file UmfPackSupport.h.
void Eigen::UmfPackLU< MatrixType >::extractData | ( | ) | const |
Definition at line 384 of file UmfPackSupport.h.
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.
Definition at line 265 of file UmfPackSupport.h.
void Eigen::UmfPackLU< _MatrixType >::factorize_impl | ( | ) | [inline, protected] |
Definition at line 348 of file UmfPackSupport.h.
void Eigen::UmfPackLU< _MatrixType >::grapInput | ( | const InputMatrixType & | mat | ) | [inline, protected] |
Definition at line 330 of file UmfPackSupport.h.
void Eigen::UmfPackLU< _MatrixType >::grapInput_impl | ( | const InputMatrixType & | mat, |
internal::true_type | |||
) | [inline, protected] |
Definition at line 301 of file UmfPackSupport.h.
void Eigen::UmfPackLU< _MatrixType >::grapInput_impl | ( | const InputMatrixType & | mat, |
internal::false_type | |||
) | [inline, protected] |
Definition at line 321 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 171 of file UmfPackSupport.h.
void Eigen::UmfPackLU< _MatrixType >::init | ( | ) | [inline, protected] |
Definition at line 288 of file UmfPackSupport.h.
const LUMatrixType& Eigen::UmfPackLU< _MatrixType >::matrixL | ( | ) | const [inline] |
Definition at line 177 of file UmfPackSupport.h.
const LUMatrixType& Eigen::UmfPackLU< _MatrixType >::matrixU | ( | ) | const [inline] |
Definition at line 183 of file UmfPackSupport.h.
const IntColVectorType& Eigen::UmfPackLU< _MatrixType >::permutationP | ( | ) | const [inline] |
Definition at line 189 of file UmfPackSupport.h.
const IntRowVectorType& Eigen::UmfPackLU< _MatrixType >::permutationQ | ( | ) | const [inline] |
Definition at line 195 of file UmfPackSupport.h.
Index Eigen::UmfPackLU< _MatrixType >::rows | ( | void | ) | const [inline] |
Definition at line 163 of file UmfPackSupport.h.
const internal::solve_retval<UmfPackLU, Rhs> Eigen::UmfPackLU< _MatrixType >::solve | ( | const MatrixBase< Rhs > & | b | ) | const [inline] |
Definition at line 220 of file UmfPackSupport.h.
const internal::sparse_solve_retval<UmfPackLU, Rhs> Eigen::UmfPackLU< _MatrixType >::solve | ( | const SparseMatrixBase< Rhs > & | b | ) | const [inline] |
Definition at line 233 of file UmfPackSupport.h.
int Eigen::UmfPackLU< _MatrixType >::m_analysisIsOk [protected] |
Definition at line 375 of file UmfPackSupport.h.
UmfpackMatrixType Eigen::UmfPackLU< _MatrixType >::m_copyMatrix [protected] |
Definition at line 365 of file UmfPackSupport.h.
bool Eigen::UmfPackLU< _MatrixType >::m_extractedDataAreDirty [mutable, protected] |
Definition at line 376 of file UmfPackSupport.h.
int Eigen::UmfPackLU< _MatrixType >::m_factorizationIsOk [protected] |
Definition at line 374 of file UmfPackSupport.h.
ComputationInfo Eigen::UmfPackLU< _MatrixType >::m_info [mutable, protected] |
Definition at line 372 of file UmfPackSupport.h.
const int* Eigen::UmfPackLU< _MatrixType >::m_innerIndexPtr [protected] |
Definition at line 368 of file UmfPackSupport.h.
bool Eigen::UmfPackLU< _MatrixType >::m_isInitialized [protected] |
Definition at line 373 of file UmfPackSupport.h.
LUMatrixType Eigen::UmfPackLU< _MatrixType >::m_l [mutable, protected] |
Definition at line 360 of file UmfPackSupport.h.
void* Eigen::UmfPackLU< _MatrixType >::m_numeric [protected] |
Definition at line 369 of file UmfPackSupport.h.
const int* Eigen::UmfPackLU< _MatrixType >::m_outerIndexPtr [protected] |
Definition at line 367 of file UmfPackSupport.h.
IntColVectorType Eigen::UmfPackLU< _MatrixType >::m_p [mutable, protected] |
Definition at line 362 of file UmfPackSupport.h.
IntRowVectorType Eigen::UmfPackLU< _MatrixType >::m_q [mutable, protected] |
Definition at line 363 of file UmfPackSupport.h.
void* Eigen::UmfPackLU< _MatrixType >::m_symbolic [protected] |
Definition at line 370 of file UmfPackSupport.h.
LUMatrixType Eigen::UmfPackLU< _MatrixType >::m_u [mutable, protected] |
Definition at line 361 of file UmfPackSupport.h.
const Scalar* Eigen::UmfPackLU< _MatrixType >::m_valuePtr [protected] |
Definition at line 366 of file UmfPackSupport.h.