calculate sparse subset of inverse of sparse matrix More...
Public Types | |
typedef SparseMatrix< Scalar, ColMajor > | MatrixType |
typedef SparseMatrix< Scalar, RowMajor > | RowMatrixType |
Public Member Functions | |
SparseInverse & | compute (const SparseMatrix< Scalar > &A) |
Calculate the sparse inverse from a given sparse input. More... | |
const MatrixType & | inverse () const |
return the already-calculated sparse inverse, or a 0x0 matrix if it could not be computed More... | |
SparseInverse () | |
SparseInverse (const SparseLU< MatrixType > &slu) | |
This Constructor is for if you already have a factored SparseLU and would like to use it to calculate a sparse inverse. More... | |
Static Public Member Functions | |
static MatrixType | computeInverse (const RowMatrixType &Upper, const Matrix< Scalar, Dynamic, 1 > &inverseDiagonal, const MatrixType &Lower) |
Internal function to calculate the inverse from strictly upper, diagonal and strictly lower components. More... | |
static MatrixType | computeInverse (const SparseLU< MatrixType > &slu) |
Internal function to calculate the sparse inverse in a functional way. More... | |
Private Attributes | |
MatrixType | _result |
calculate sparse subset of inverse of sparse matrix
This class returns a sparse subset of the inverse of the input matrix. The nonzeros correspond to the nonzeros of the input, plus any additional elements required due to fill-in of the internal LU factorization. This is is minimized via a applying a fill-reducing permutation as part of the LU factorization.
If there are specific entries of the input matrix which you need inverse values for, which are zero for the input, you need to insert entries into the input sparse matrix for them to be calculated.
Due to the sensitive nature of matrix inversion, particularly on large matrices which are made possible via sparsity, high accuracy dot products based on Kahan summation are used to reduce numerical error. If you still encounter numerical errors you may with to equilibrate your matrix before calculating the inverse, as well as making sure it is actually full rank.
Definition at line 127 of file SparseInverse.h.
typedef SparseMatrix<Scalar, ColMajor> Eigen::SparseInverse< Scalar >::MatrixType |
Definition at line 129 of file SparseInverse.h.
typedef SparseMatrix<Scalar, RowMajor> Eigen::SparseInverse< Scalar >::RowMatrixType |
Definition at line 130 of file SparseInverse.h.
|
inline |
Definition at line 132 of file SparseInverse.h.
|
inline |
This Constructor is for if you already have a factored SparseLU and would like to use it to calculate a sparse inverse.
Just call this constructor with your already factored SparseLU class and you can directly call the .inverse() method to get the result.
Definition at line 141 of file SparseInverse.h.
|
inline |
Calculate the sparse inverse from a given sparse input.
Definition at line 146 of file SparseInverse.h.
|
inlinestatic |
Internal function to calculate the inverse from strictly upper, diagonal and strictly lower components.
Definition at line 184 of file SparseInverse.h.
|
inlinestatic |
Internal function to calculate the sparse inverse in a functional way.
Definition at line 162 of file SparseInverse.h.
|
inline |
return the already-calculated sparse inverse, or a 0x0 matrix if it could not be computed
Definition at line 156 of file SparseInverse.h.
|
private |
Definition at line 227 of file SparseInverse.h.