LU decomposition of a sparse matrix and associated features. More...
#include <SparseLU.h>
Public Member Functions | |
void | compute (const MatrixType &matrix) |
int | flags () const |
int | orderingMethod () const |
RealScalar | precision () const |
void | setFlags (int f) |
void | setOrderingMethod (int m) |
void | setPrecision (RealScalar v) |
template<typename BDerived , typename XDerived > | |
bool | solve (const MatrixBase< BDerived > &b, MatrixBase< XDerived > *x) const |
SparseLU (const MatrixType &matrix, int flags=0) | |
SparseLU (int flags=0) | |
bool | succeeded (void) const |
Protected Types | |
enum | { MatrixLUIsDirty = 0x10000 } |
typedef SparseMatrix< Scalar, LowerTriangular > | LUMatrixType |
typedef NumTraits< typename MatrixType::Scalar >::Real | RealScalar |
typedef MatrixType::Scalar | Scalar |
Protected Attributes | |
int | m_flags |
RealScalar | m_precision |
int | m_status |
bool | m_succeeded |
LU decomposition of a sparse matrix and associated features.
MatrixType | the type of the matrix of which we are computing the LU factorization |
Definition at line 39 of file SparseLU.h.
typedef SparseMatrix<Scalar,LowerTriangular> SparseLU< MatrixType, Backend >::LUMatrixType [protected] |
Definition at line 44 of file SparseLU.h.
typedef NumTraits<typename MatrixType::Scalar>::Real SparseLU< MatrixType, Backend >::RealScalar [protected] |
Reimplemented in SparseLU< MatrixType, SuperLU >, and SparseLU< MatrixType, UmfPack >.
Definition at line 43 of file SparseLU.h.
typedef MatrixType::Scalar SparseLU< MatrixType, Backend >::Scalar [protected] |
Reimplemented in SparseLU< MatrixType, SuperLU >, and SparseLU< MatrixType, UmfPack >.
Definition at line 42 of file SparseLU.h.
anonymous enum [protected] |
Definition at line 46 of file SparseLU.h.
SparseLU< MatrixType, Backend >::SparseLU | ( | int | flags = 0 |
) | [inline] |
Creates a dummy LU factorization object with flags flags.
Reimplemented in SparseLU< MatrixType, SuperLU >, and SparseLU< MatrixType, UmfPack >.
Definition at line 53 of file SparseLU.h.
SparseLU< MatrixType, Backend >::SparseLU | ( | const MatrixType & | matrix, | |
int | flags = 0 | |||
) | [inline] |
Creates a LU object and compute the respective factorization of matrix using flags flags.
Reimplemented in SparseLU< MatrixType, SuperLU >, and SparseLU< MatrixType, UmfPack >.
Definition at line 61 of file SparseLU.h.
void SparseLU< MatrixType, Backend >::compute | ( | const MatrixType & | a | ) | [inline] |
Computes/re-computes the LU factorization
Computes / recomputes the LU decomposition of matrix a using the default algorithm.
Reimplemented in SparseLU< MatrixType, SuperLU >, and SparseLU< MatrixType, UmfPack >.
Definition at line 134 of file SparseLU.h.
int SparseLU< MatrixType, Backend >::flags | ( | ) | const [inline] |
Definition at line 95 of file SparseLU.h.
int SparseLU< MatrixType, Backend >::orderingMethod | ( | ) | const [inline] |
Definition at line 103 of file SparseLU.h.
RealScalar SparseLU< MatrixType, Backend >::precision | ( | ) | const [inline] |
void SparseLU< MatrixType, Backend >::setFlags | ( | int | f | ) | [inline] |
Sets the flags. Possible values are:
Definition at line 93 of file SparseLU.h.
void SparseLU< MatrixType, Backend >::setOrderingMethod | ( | int | m | ) | [inline] |
Definition at line 97 of file SparseLU.h.
void SparseLU< MatrixType, Backend >::setPrecision | ( | RealScalar | v | ) | [inline] |
Sets the relative threshold value used to prune zero coefficients during the decomposition.
Setting a value greater than zero speeds up computation, and yields to an imcomplete factorization with fewer non zero coefficients. Such approximate factors are especially useful to initialize an iterative solver.
Note that the exact meaning of this parameter might depends on the actual backend. Moreover, not all backends support this feature.
Definition at line 78 of file SparseLU.h.
bool SparseLU< MatrixType, Backend >::solve | ( | const MatrixBase< BDerived > & | b, | |
MatrixBase< XDerived > * | x | |||
) | const [inline] |
Computes *x = U^-1 L^-1 b
Reimplemented in SparseLU< MatrixType, SuperLU >, and SparseLU< MatrixType, UmfPack >.
Definition at line 142 of file SparseLU.h.
bool SparseLU< MatrixType, Backend >::succeeded | ( | void | ) | const [inline] |
Definition at line 121 of file SparseLU.h.
int SparseLU< MatrixType, Backend >::m_flags [protected] |
Definition at line 125 of file SparseLU.h.
RealScalar SparseLU< MatrixType, Backend >::m_precision [protected] |
Definition at line 124 of file SparseLU.h.
int SparseLU< MatrixType, Backend >::m_status [mutable, protected] |
Definition at line 126 of file SparseLU.h.
bool SparseLU< MatrixType, Backend >::m_succeeded [protected] |
Definition at line 127 of file SparseLU.h.