![]() |
Eigen-unsupported
5.0.1-dev+7c7d8473
|
#include <unsupported/Eigen/src/SparseExtra/SparseInverse.h>
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.
Public Member Functions | |
| SparseInverse & | compute (const SparseMatrix< Scalar > &A) |
| Calculate the sparse inverse from a given sparse input. | |
| const MatrixType & | inverse () const |
| return the already-calculated sparse inverse, or a 0x0 matrix if it could not be computed | |
| 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. | |
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. | |
| static MatrixType | computeInverse (const SparseLU< MatrixType > &slu) |
| Internal function to calculate the sparse inverse in a functional way. | |
|
inline |
|
inlinestatic |
Internal function to calculate the sparse inverse in a functional way.