Sparse supernodal LU factorization for general matrices. More...
Public Types | |
enum | { ColsAtCompileTime , MaxColsAtCompileTime } |
typedef internal::SparseLUImpl< Scalar, StorageIndex > | Base |
typedef Matrix< StorageIndex, Dynamic, 1 > | IndexVector |
typedef MatrixType_ | MatrixType |
typedef SparseMatrix< Scalar, ColMajor, StorageIndex > | NCMatrix |
typedef OrderingType_ | OrderingType |
typedef PermutationMatrix< Dynamic, Dynamic, StorageIndex > | PermutationType |
typedef MatrixType::RealScalar | RealScalar |
typedef MatrixType::Scalar | Scalar |
typedef Matrix< Scalar, Dynamic, 1 > | ScalarVector |
typedef internal::MappedSuperNodalMatrix< Scalar, StorageIndex > | SCMatrix |
typedef MatrixType::StorageIndex | StorageIndex |
Public Member Functions | |
template<typename Rhs , typename Dest > | |
bool | _solve_impl (const MatrixBase< Rhs > &B, MatrixBase< Dest > &X_base) const |
Scalar | absDeterminant () |
const SparseLUTransposeView< true, SparseLU< MatrixType_, OrderingType_ > > | adjoint () |
void | analyzePattern (const MatrixType &matrix) |
Index | cols () const |
const PermutationType & | colsPermutation () const |
void | compute (const MatrixType &matrix) |
Scalar | determinant () |
void | factorize (const MatrixType &matrix) |
ComputationInfo | info () const |
Reports whether previous computation was successful. More... | |
void | isSymmetric (bool sym) |
std::string | lastErrorMessage () const |
Scalar | logAbsDeterminant () const |
SparseLUMatrixLReturnType< SCMatrix > | matrixL () const |
SparseLUMatrixUReturnType< SCMatrix, Map< SparseMatrix< Scalar, ColMajor, StorageIndex > > > | matrixU () const |
Index | nnzL () const |
Index | nnzU () const |
Index | rows () const |
const PermutationType & | rowsPermutation () const |
void | setPivotThreshold (const RealScalar &thresh) |
Scalar | signDeterminant () |
void | simplicialfactorize (const MatrixType &matrix) |
template<typename Rhs > | |
const Solve< SparseLU, Rhs > | solve (const MatrixBase< Rhs > &B) const |
SparseLU () | |
SparseLU (const MatrixType &matrix) | |
const SparseLUTransposeView< false, SparseLU< MatrixType_, OrderingType_ > > | transpose () |
~SparseLU () | |
Public Member Functions inherited from Eigen::SparseSolverBase< SparseLU< MatrixType_, OrderingType_ > > | |
SparseLU< MatrixType_, OrderingType_ > & | derived () |
const SparseLU< MatrixType_, OrderingType_ > & | derived () const |
const Solve< SparseLU< MatrixType_, OrderingType_ >, Rhs > | solve (const MatrixBase< Rhs > &b) const |
const Solve< SparseLU< MatrixType_, OrderingType_ >, Rhs > | solve (const SparseMatrixBase< Rhs > &b) const |
SparseSolverBase () | |
SparseSolverBase (SparseSolverBase &&other) | |
~SparseSolverBase () | |
Protected Types | |
typedef SparseSolverBase< SparseLU< MatrixType_, OrderingType_ > > | APIBase |
Protected Member Functions | |
void | initperfvalues () |
Protected Attributes | |
bool | m_analysisIsOk |
Index | m_detPermC |
Index | m_detPermR |
RealScalar | m_diagpivotthresh |
IndexVector | m_etree |
bool | m_factorizationIsOk |
Base::GlobalLU_t | m_glu |
ComputationInfo | m_info |
std::string | m_lastError |
SCMatrix | m_Lstore |
NCMatrix | m_mat |
Index | m_nnzL |
Index | m_nnzU |
internal::perfvalues | m_perfv |
PermutationType | m_perm_c |
PermutationType | m_perm_r |
bool | m_symmetricmode |
Map< SparseMatrix< Scalar, ColMajor, StorageIndex > > | m_Ustore |
Protected Attributes inherited from Eigen::SparseSolverBase< SparseLU< MatrixType_, OrderingType_ > > | |
bool | m_isInitialized |
Private Member Functions | |
SparseLU (const SparseLU &) | |
Sparse supernodal LU factorization for general matrices.
This class implements the supernodal LU factorization for general matrices. It uses the main techniques from the sequential SuperLU package (http://crd-legacy.lbl.gov/~xiaoye/SuperLU/). It handles transparently real and complex arithmetic with single and double precision, depending on the scalar type of your input matrix. The code has been optimized to provide BLAS-3 operations during supernode-panel updates. It benefits directly from the built-in high-performant Eigen BLAS routines. Moreover, when the size of a supernode is very small, the BLAS calls are avoided to enable a better optimization from the compiler. For best performance, you should compile it with NDEBUG flag to avoid the numerous bounds checking on vectors.
An important parameter of this class is the ordering method. It is used to reorder the columns (and eventually the rows) of the matrix to reduce the number of new elements that are created during numerical factorization. The cheapest method available is COLAMD. See the OrderingMethods module for the list of built-in and external ordering methods.
Simple example with key steps
MatrixType_ | The type of the sparse matrix. It must be a column-major SparseMatrix<> |
OrderingType_ | The ordering method to use, either AMD, COLAMD or METIS. Default is COLMAD |
This class follows the sparse solver concept .
Definition at line 134 of file SparseLU.h.
|
protected |
Definition at line 137 of file SparseLU.h.
typedef internal::SparseLUImpl<Scalar, StorageIndex> Eigen::SparseLU< MatrixType_, OrderingType_ >::Base |
Definition at line 152 of file SparseLU.h.
typedef Matrix<StorageIndex,Dynamic,1> Eigen::SparseLU< MatrixType_, OrderingType_ >::IndexVector |
Definition at line 150 of file SparseLU.h.
typedef MatrixType_ Eigen::SparseLU< MatrixType_, OrderingType_ >::MatrixType |
Definition at line 142 of file SparseLU.h.
typedef SparseMatrix<Scalar,ColMajor,StorageIndex> Eigen::SparseLU< MatrixType_, OrderingType_ >::NCMatrix |
Definition at line 147 of file SparseLU.h.
typedef OrderingType_ Eigen::SparseLU< MatrixType_, OrderingType_ >::OrderingType |
Definition at line 143 of file SparseLU.h.
typedef PermutationMatrix<Dynamic, Dynamic, StorageIndex> Eigen::SparseLU< MatrixType_, OrderingType_ >::PermutationType |
Definition at line 151 of file SparseLU.h.
typedef MatrixType::RealScalar Eigen::SparseLU< MatrixType_, OrderingType_ >::RealScalar |
Definition at line 145 of file SparseLU.h.
typedef MatrixType::Scalar Eigen::SparseLU< MatrixType_, OrderingType_ >::Scalar |
Definition at line 144 of file SparseLU.h.
typedef Matrix<Scalar,Dynamic,1> Eigen::SparseLU< MatrixType_, OrderingType_ >::ScalarVector |
Definition at line 149 of file SparseLU.h.
typedef internal::MappedSuperNodalMatrix<Scalar, StorageIndex> Eigen::SparseLU< MatrixType_, OrderingType_ >::SCMatrix |
Definition at line 148 of file SparseLU.h.
typedef MatrixType::StorageIndex Eigen::SparseLU< MatrixType_, OrderingType_ >::StorageIndex |
Definition at line 146 of file SparseLU.h.
anonymous enum |
|
inline |
Definition at line 161 of file SparseLU.h.
|
inlineexplicit |
Definition at line 165 of file SparseLU.h.
|
inline |
Definition at line 172 of file SparseLU.h.
|
private |
|
inline |
Definition at line 317 of file SparseLU.h.
|
inline |
Definition at line 353 of file SparseLU.h.
|
inline |
A typical usage is to solve for the adjoint problem A' x = b:
For real scalar types, this function is equivalent to transpose().
Definition at line 224 of file SparseLU.h.
void Eigen::SparseLU< MatrixType, OrderingType >::analyzePattern | ( | const MatrixType & | mat | ) |
Compute the column permutation to minimize the fill-in
Definition at line 513 of file SparseLU.h.
|
inline |
Definition at line 233 of file SparseLU.h.
|
inline |
Definition at line 273 of file SparseLU.h.
|
inline |
Compute the symbolic and numeric factorization of the input sparse matrix. The input matrix should be in column-major storage.
Definition at line 185 of file SparseLU.h.
|
inline |
Definition at line 437 of file SparseLU.h.
void Eigen::SparseLU< MatrixType, OrderingType >::factorize | ( | const MatrixType & | matrix | ) |
Interleaved with the symbolic factorization On exit, info is
= 0: successful factorization
0: if info = i, and i is
<= A->ncol: U(i,i) is exactly zero. The factorization has been completed, but the factor U is exactly singular, and division by zero will occur if it is used to solve a system of equations.
> A->ncol: number of bytes allocated when memory allocation failure occurred, plus A->ncol. If lwork = -1, it is the estimated amount of space needed, plus A->ncol.
Definition at line 598 of file SparseLU.h.
|
inline |
Reports whether previous computation was successful.
Success
if computation was successful, NumericalIssue
if the LU factorization reports a problem, zero diagonal for instance InvalidInput
if the input matrix is invalidDefinition at line 302 of file SparseLU.h.
|
inlineprotected |
|
inline |
Indicate that the pattern of the input matrix is symmetric
Definition at line 235 of file SparseLU.h.
|
inline |
Definition at line 311 of file SparseLU.h.
|
inline |
Definition at line 383 of file SparseLU.h.
|
inline |
Definition at line 246 of file SparseLU.h.
|
inline |
Definition at line 256 of file SparseLU.h.
|
inline |
Definition at line 458 of file SparseLU.h.
|
inline |
Definition at line 459 of file SparseLU.h.
|
inline |
Definition at line 232 of file SparseLU.h.
|
inline |
Definition at line 265 of file SparseLU.h.
|
inline |
Set the threshold used for a diagonal entry to be an acceptable pivot.
Definition at line 278 of file SparseLU.h.
|
inline |
Definition at line 409 of file SparseLU.h.
void Eigen::SparseLU< MatrixType_, OrderingType_ >::simplicialfactorize | ( | const MatrixType & | matrix | ) |
|
inline |
|
inline |
A typical usage is to solve for the transposed problem A^T x = b:
Definition at line 203 of file SparseLU.h.
|
protected |
Definition at line 476 of file SparseLU.h.
|
protected |
Definition at line 493 of file SparseLU.h.
|
protected |
Definition at line 493 of file SparseLU.h.
|
protected |
Definition at line 491 of file SparseLU.h.
|
protected |
Definition at line 483 of file SparseLU.h.
|
protected |
Definition at line 475 of file SparseLU.h.
|
protected |
Definition at line 485 of file SparseLU.h.
|
mutableprotected |
Definition at line 474 of file SparseLU.h.
|
protected |
Definition at line 477 of file SparseLU.h.
|
protected |
Definition at line 479 of file SparseLU.h.
|
protected |
Definition at line 478 of file SparseLU.h.
|
protected |
Definition at line 492 of file SparseLU.h.
|
protected |
Definition at line 492 of file SparseLU.h.
|
protected |
Definition at line 490 of file SparseLU.h.
|
protected |
Definition at line 481 of file SparseLU.h.
|
protected |
Definition at line 482 of file SparseLU.h.
|
protected |
Definition at line 488 of file SparseLU.h.
|
protected |
Definition at line 480 of file SparseLU.h.