![]() |
|
A sparse LU factorization and solver based on UmfPack. More...
#include <UmfPackSupport.h>
Inheritance diagram for Eigen::UmfPackLU< MatrixType_ >: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, StorageIndex > | UmfpackMatrixType |
| typedef Ref< const UmfpackMatrixType, StandardCompressedFormat > | UmfpackMatrixRef |
| typedef Array< double, UMFPACK_CONTROL, 1 > | UmfpackControl |
| typedef Array< double, UMFPACK_INFO, 1 > | UmfpackInfo |
Public Member Functions | |
| UmfPackLU () | |
| template<typename InputMatrixType > | |
| UmfPackLU (const InputMatrixType &matrix) | |
| ~UmfPackLU () | |
| Index | rows () const |
| Index | cols () const |
| ComputationInfo | info () const |
| Reports whether previous computation was successful. More... | |
| const LUMatrixType & | matrixL () const |
| const LUMatrixType & | matrixU () const |
| const IntColVectorType & | permutationP () const |
| const IntRowVectorType & | permutationQ () const |
| template<typename InputMatrixType > | |
| void | compute (const InputMatrixType &matrix) |
| template<typename InputMatrixType > | |
| void | analyzePattern (const InputMatrixType &matrix) |
| int | umfpackFactorizeReturncode () const |
| const UmfpackControl & | umfpackControl () const |
| UmfpackControl & | umfpackControl () |
| template<typename InputMatrixType > | |
| void | factorize (const InputMatrixType &matrix) |
| void | printUmfpackControl () |
| void | printUmfpackInfo () |
| void | printUmfpackStatus () |
| 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 () | |
| SparseSolverBase (SparseSolverBase &&other) | |
| ~SparseSolverBase () | |
| 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 |
| StorageIndex | m_fact_errorCode |
| UmfpackControl | m_control |
| UmfpackInfo | m_umfpackInfo |
| 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 |
Private Member Functions | |
| UmfPackLU (const 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<> |
\implsparsesolverconcept
|
protected |
| typedef Matrix<int, MatrixType::RowsAtCompileTime, 1> Eigen::UmfPackLU< MatrixType_ >::IntColVectorType |
| typedef Matrix<int, 1, MatrixType::ColsAtCompileTime> Eigen::UmfPackLU< MatrixType_ >::IntRowVectorType |
| typedef SparseMatrix<Scalar> Eigen::UmfPackLU< MatrixType_ >::LUMatrixType |
| typedef MatrixType_ Eigen::UmfPackLU< MatrixType_ >::MatrixType |
| typedef MatrixType::RealScalar Eigen::UmfPackLU< MatrixType_ >::RealScalar |
| typedef MatrixType::Scalar Eigen::UmfPackLU< MatrixType_ >::Scalar |
| typedef MatrixType::StorageIndex Eigen::UmfPackLU< MatrixType_ >::StorageIndex |
| typedef Array<double, UMFPACK_CONTROL, 1> Eigen::UmfPackLU< MatrixType_ >::UmfpackControl |
| typedef Array<double, UMFPACK_INFO, 1> Eigen::UmfPackLU< MatrixType_ >::UmfpackInfo |
| typedef Ref<const UmfpackMatrixType, StandardCompressedFormat> Eigen::UmfPackLU< MatrixType_ >::UmfpackMatrixRef |
| typedef SparseMatrix<Scalar, ColMajor, StorageIndex> Eigen::UmfPackLU< MatrixType_ >::UmfpackMatrixType |
| typedef Matrix<Scalar, Dynamic, 1> Eigen::UmfPackLU< MatrixType_ >::Vector |
| anonymous enum |
| Enumerator | |
|---|---|
| ColsAtCompileTime | |
| MaxColsAtCompileTime | |
|
inline |
References Eigen::UmfPackLU< MatrixType_ >::init().
|
inlineexplicit |
References Eigen::UmfPackLU< MatrixType_ >::compute(), Eigen::UmfPackLU< MatrixType_ >::init(), and matrix().
|
inline |
References Eigen::UmfPackLU< MatrixType_ >::m_numeric, Eigen::UmfPackLU< MatrixType_ >::m_symbolic, Eigen::umfpack_free_numeric(), and Eigen::umfpack_free_symbolic().
|
inlineprivate |
| bool Eigen::UmfPackLU< MatrixType >::_solve_impl | ( | const MatrixBase< BDerived > & | b, |
| MatrixBase< XDerived > & | x | ||
| ) | const |
References b, Eigen::PlainObjectBase< Derived >::data(), eigen_assert, j, Eigen::PlainObjectBase< Derived >::resize(), Eigen::RowMajorBit, Eigen::umfpack_solve(), and plotDoE::x.
|
inline |
Performs a symbolic decomposition on the sparcity of matrix.
This function is particularly useful when solving for several problems having the same structure.
References Eigen::UmfPackLU< MatrixType_ >::analyzePattern_impl(), Eigen::UmfPackLU< MatrixType_ >::grab(), Eigen::UmfPackLU< MatrixType_ >::m_numeric, Eigen::UmfPackLU< MatrixType_ >::m_symbolic, matrix(), Eigen::umfpack_free_numeric(), and Eigen::umfpack_free_symbolic().
|
inlineprotected |
References Eigen::PlainObjectBase< Derived >::data(), Eigen::InvalidInput, Eigen::UmfPackLU< MatrixType_ >::m_analysisIsOk, Eigen::UmfPackLU< MatrixType_ >::m_control, Eigen::UmfPackLU< MatrixType_ >::m_extractedDataAreDirty, Eigen::UmfPackLU< MatrixType_ >::m_fact_errorCode, Eigen::UmfPackLU< MatrixType_ >::m_factorizationIsOk, Eigen::UmfPackLU< MatrixType_ >::m_info, Eigen::SparseSolverBase< UmfPackLU< MatrixType_ > >::m_isInitialized, Eigen::UmfPackLU< MatrixType_ >::m_symbolic, Eigen::UmfPackLU< MatrixType_ >::m_umfpackInfo, Eigen::UmfPackLU< MatrixType_ >::mp_matrix, Eigen::Success, and Eigen::umfpack_symbolic().
Referenced by Eigen::UmfPackLU< MatrixType_ >::analyzePattern(), and Eigen::UmfPackLU< MatrixType_ >::compute().
|
inline |
References Eigen::UmfPackLU< MatrixType_ >::mp_matrix.
Referenced by gdb.printers._MatrixEntryIterator::__next__(), gdb.printers.EigenMatrixPrinter::children(), gdb.printers.EigenSparseMatrixPrinter::children(), gdb.printers.EigenMatrixPrinter::to_string(), and gdb.printers.EigenSparseMatrixPrinter::to_string().
|
inline |
Computes the sparse Cholesky decomposition of matrix Note that the matrix should be column-major, and in compressed format for best performance.
References Eigen::UmfPackLU< MatrixType_ >::analyzePattern_impl(), Eigen::UmfPackLU< MatrixType_ >::factorize_impl(), Eigen::UmfPackLU< MatrixType_ >::grab(), Eigen::UmfPackLU< MatrixType_ >::m_numeric, Eigen::UmfPackLU< MatrixType_ >::m_symbolic, matrix(), Eigen::umfpack_free_numeric(), and Eigen::umfpack_free_symbolic().
Referenced by Eigen::UmfPackLU< MatrixType_ >::UmfPackLU().
| UmfPackLU< MatrixType >::Scalar Eigen::UmfPackLU< MatrixType >::determinant |
References Eigen::umfpack_get_determinant().
| void Eigen::UmfPackLU< MatrixType >::extractData |
References cols, min, rows, Eigen::umfpack_get_lunz(), and Eigen::umfpack_get_numeric().
Referenced by Eigen::UmfPackLU< MatrixType_ >::matrixL(), Eigen::UmfPackLU< MatrixType_ >::matrixU(), Eigen::UmfPackLU< MatrixType_ >::permutationP(), and Eigen::UmfPackLU< MatrixType_ >::permutationQ().
|
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.
References eigen_assert, Eigen::UmfPackLU< MatrixType_ >::factorize_impl(), Eigen::UmfPackLU< MatrixType_ >::grab(), Eigen::UmfPackLU< MatrixType_ >::m_analysisIsOk, Eigen::UmfPackLU< MatrixType_ >::m_numeric, matrix(), and Eigen::umfpack_free_numeric().
|
inlineprotected |
References Eigen::PlainObjectBase< Derived >::data(), Eigen::UmfPackLU< MatrixType_ >::m_control, Eigen::UmfPackLU< MatrixType_ >::m_extractedDataAreDirty, Eigen::UmfPackLU< MatrixType_ >::m_fact_errorCode, Eigen::UmfPackLU< MatrixType_ >::m_factorizationIsOk, Eigen::UmfPackLU< MatrixType_ >::m_info, Eigen::UmfPackLU< MatrixType_ >::m_numeric, Eigen::UmfPackLU< MatrixType_ >::m_symbolic, Eigen::UmfPackLU< MatrixType_ >::m_umfpackInfo, Eigen::UmfPackLU< MatrixType_ >::mp_matrix, Eigen::NumericalIssue, Eigen::Success, and Eigen::umfpack_numeric().
Referenced by Eigen::UmfPackLU< MatrixType_ >::compute(), and Eigen::UmfPackLU< MatrixType_ >::factorize().
|
inlineprotected |
References Eigen::internal::construct_at(), Eigen::internal::destroy_at(), and Eigen::UmfPackLU< MatrixType_ >::mp_matrix.
Referenced by Eigen::UmfPackLU< MatrixType_ >::analyzePattern(), Eigen::UmfPackLU< MatrixType_ >::compute(), and Eigen::UmfPackLU< MatrixType_ >::factorize().
|
inlineprotected |
|
inline |
Reports whether previous computation was successful.
Success if computation was successful, NumericalIssue if the matrix.appears to be negative. References eigen_assert, Eigen::UmfPackLU< MatrixType_ >::m_info, and Eigen::SparseSolverBase< UmfPackLU< MatrixType_ > >::m_isInitialized.
|
inlineprotected |
References Eigen::PlainObjectBase< Derived >::data(), Eigen::InvalidInput, Eigen::UmfPackLU< MatrixType_ >::m_control, Eigen::UmfPackLU< MatrixType_ >::m_extractedDataAreDirty, Eigen::UmfPackLU< MatrixType_ >::m_info, Eigen::SparseSolverBase< UmfPackLU< MatrixType_ > >::m_isInitialized, Eigen::UmfPackLU< MatrixType_ >::m_numeric, Eigen::UmfPackLU< MatrixType_ >::m_symbolic, and Eigen::umfpack_defaults().
Referenced by Eigen::UmfPackLU< MatrixType_ >::UmfPackLU().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Prints the current UmfPack control settings.
References Eigen::PlainObjectBase< Derived >::data(), Eigen::UmfPackLU< MatrixType_ >::m_control, and Eigen::umfpack_report_control().
|
inline |
Prints statistics collected by UmfPack.
References Eigen::PlainObjectBase< Derived >::data(), eigen_assert, Eigen::UmfPackLU< MatrixType_ >::m_analysisIsOk, Eigen::UmfPackLU< MatrixType_ >::m_control, Eigen::UmfPackLU< MatrixType_ >::m_umfpackInfo, and Eigen::umfpack_report_info().
|
inline |
Prints the status of the previous factorization operation performed by UmfPack (symbolic or numerical factorization).
References Eigen::PlainObjectBase< Derived >::data(), eigen_assert, Eigen::UmfPackLU< MatrixType_ >::m_analysisIsOk, Eigen::UmfPackLU< MatrixType_ >::m_control, Eigen::UmfPackLU< MatrixType_ >::m_fact_errorCode, and Eigen::umfpack_report_status().
|
inline |
References Eigen::UmfPackLU< MatrixType_ >::mp_matrix.
Referenced by gdb.printers._MatrixEntryIterator::__next__(), gdb.printers.EigenMatrixPrinter::children(), gdb.printers.EigenSparseMatrixPrinter::children(), gdb.printers.EigenMatrixPrinter::to_string(), and gdb.printers.EigenSparseMatrixPrinter::to_string().
|
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.
References Eigen::UmfPackLU< MatrixType_ >::m_control.
|
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.
References Eigen::UmfPackLU< MatrixType_ >::m_control.
|
inline |
Provides the return status code returned by UmfPack during the numeric factorization.
References eigen_assert, Eigen::UmfPackLU< MatrixType_ >::m_fact_errorCode, and Eigen::UmfPackLU< MatrixType_ >::m_numeric.
|
protected |
|
protected |
Referenced by Eigen::UmfPackLU< MatrixType_ >::analyzePattern_impl(), Eigen::UmfPackLU< MatrixType_ >::factorize_impl(), Eigen::UmfPackLU< MatrixType_ >::init(), Eigen::UmfPackLU< MatrixType_ >::printUmfpackControl(), Eigen::UmfPackLU< MatrixType_ >::printUmfpackInfo(), Eigen::UmfPackLU< MatrixType_ >::printUmfpackStatus(), and Eigen::UmfPackLU< MatrixType_ >::umfpackControl().
|
protected |
|
mutableprotected |
Referenced by Eigen::UmfPackLU< MatrixType_ >::analyzePattern_impl(), Eigen::UmfPackLU< MatrixType_ >::factorize_impl(), Eigen::UmfPackLU< MatrixType_ >::init(), Eigen::UmfPackLU< MatrixType_ >::matrixL(), Eigen::UmfPackLU< MatrixType_ >::matrixU(), Eigen::UmfPackLU< MatrixType_ >::permutationP(), and Eigen::UmfPackLU< MatrixType_ >::permutationQ().
|
protected |
|
protected |
|
mutableprotected |
|
mutableprotected |
Referenced by Eigen::UmfPackLU< MatrixType_ >::matrixL().
|
protected |
Referenced by Eigen::UmfPackLU< MatrixType_ >::analyzePattern(), Eigen::UmfPackLU< MatrixType_ >::compute(), Eigen::UmfPackLU< MatrixType_ >::factorize(), Eigen::UmfPackLU< MatrixType_ >::factorize_impl(), Eigen::UmfPackLU< MatrixType_ >::init(), Eigen::UmfPackLU< MatrixType_ >::umfpackFactorizeReturncode(), and Eigen::UmfPackLU< MatrixType_ >::~UmfPackLU().
|
mutableprotected |
Referenced by Eigen::UmfPackLU< MatrixType_ >::permutationP().
|
mutableprotected |
Referenced by Eigen::UmfPackLU< MatrixType_ >::permutationQ().
|
protected |
Referenced by Eigen::UmfPackLU< MatrixType_ >::analyzePattern(), Eigen::UmfPackLU< MatrixType_ >::analyzePattern_impl(), Eigen::UmfPackLU< MatrixType_ >::compute(), Eigen::UmfPackLU< MatrixType_ >::factorize_impl(), Eigen::UmfPackLU< MatrixType_ >::init(), and Eigen::UmfPackLU< MatrixType_ >::~UmfPackLU().
|
mutableprotected |
Referenced by Eigen::UmfPackLU< MatrixType_ >::matrixU().
|
mutableprotected |
|
protected |