SOFA API  b3f2f2a4
Open source framework for multi-physics simuation
sofa::linearalgebra::SparseMatrixStorageOrder< TMatrix > Class Template Reference

#include <SparseMatrixStorageOrder.h>

Detailed Description

template<class TMatrix>
class sofa::linearalgebra::SparseMatrixStorageOrder< TMatrix >

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 ()
 

Constructor details

◆ SparseMatrixStorageOrder()

template<class TMatrix >
sofa::linearalgebra::SparseMatrixStorageOrder< TMatrix >::SparseMatrixStorageOrder ( const TMatrix *  m)
inlineexplicit

Function details

◆ buildOppositeOrder() [1/5]

template<class TMatrix >
void sofa::linearalgebra::SparseMatrixStorageOrder< TMatrix >::buildOppositeOrder ( )

◆ buildOppositeOrder() [2/5]

void sofa::linearalgebra::SparseMatrixStorageOrder< Eigen::SparseMatrix< float > >::buildOppositeOrder ( )

◆ buildOppositeOrder() [3/5]

void sofa::linearalgebra::SparseMatrixStorageOrder< Eigen::SparseMatrix< double > >::buildOppositeOrder ( )

◆ buildOppositeOrder() [4/5]

void sofa::linearalgebra::SparseMatrixStorageOrder< Eigen::SparseMatrix< float, Eigen::RowMajor > >::buildOppositeOrder ( )

◆ buildOppositeOrder() [5/5]

void sofa::linearalgebra::SparseMatrixStorageOrder< Eigen::SparseMatrix< double, Eigen::RowMajor > >::buildOppositeOrder ( )

◆ getInnerIndices()

template<class TMatrix >
const type::vector<Index>& sofa::linearalgebra::SparseMatrixStorageOrder< TMatrix >::getInnerIndices ( ) const
inline

◆ getOuterStarts()

template<class TMatrix >
const type::vector<Index>& sofa::linearalgebra::SparseMatrixStorageOrder< TMatrix >::getOuterStarts ( ) const
inline

◆ getPermutations()

template<class TMatrix >
const type::vector<Index>& sofa::linearalgebra::SparseMatrixStorageOrder< TMatrix >::getPermutations ( ) const
inline