#include <SparseMatrixStorageOrder.h>
Compute the opposite representation of a sparse matrix. If the input matrix is column-major (resp. row-major), the output matrix is row-major (resp. column-major).
The output is not really a matrix per se, but a data structure representing the opposite representation. It also provides a permutation array, that allows to retrieve the initial value of a matrix entry in the input matrix.
As mentionned, the output is not a matrix, but a dedicated iterator allows to loop over non-zero entries, in a similar fashion than in Eigen.
If only values of the input matrix change, but not its pattern, the output matrix will not change. And the iterator provides the values of the input matrix. It means this data structure can be computed only once as long as the matrix pattern does not change.
Classes | |
class | InnerIterator |
Public Member Functions | |
SparseMatrixStorageOrder (const TMatrix *m) | |
void | buildOppositeOrder () |
const type::vector< Index > & | getOuterStarts () const |
const type::vector< Index > & | getInnerIndices () const |
const type::vector< Index > & | getPermutations () const |
void | buildOppositeOrder () |
void | buildOppositeOrder () |
void | buildOppositeOrder () |
void | buildOppositeOrder () |
|
inlineexplicit |
void sofa::linearalgebra::SparseMatrixStorageOrder< TMatrix >::buildOppositeOrder | ( | ) |
void sofa::linearalgebra::SparseMatrixStorageOrder< Eigen::SparseMatrix< float > >::buildOppositeOrder | ( | ) |
void sofa::linearalgebra::SparseMatrixStorageOrder< Eigen::SparseMatrix< double > >::buildOppositeOrder | ( | ) |
void sofa::linearalgebra::SparseMatrixStorageOrder< Eigen::SparseMatrix< float, Eigen::RowMajor > >::buildOppositeOrder | ( | ) |
void sofa::linearalgebra::SparseMatrixStorageOrder< Eigen::SparseMatrix< double, Eigen::RowMajor > >::buildOppositeOrder | ( | ) |
|
inline |
|
inline |
|
inline |