SOFA API  1a4bb3e7
Open source framework for multi-physics simuation
sofa::linearalgebra::SparseMatrix< T > Class Template Reference

#include <SparseMatrix.h>

Inheritance diagram for sofa::linearalgebra::SparseMatrix< T >:

Detailed Description

template<typename T>
class sofa::linearalgebra::SparseMatrix< T >

This is basically a map of map of T, wrapped in a linearalgebra::BaseMatrix interface. The const access methods avoid creating the entries when they do not exist.

Protected Attributes

Data data
 
Index nRow
 
Index nCol
 

Public Member Functions

 SparseMatrix ()
 
 SparseMatrix (Index nbRow, Index nbCol)
 
LineIterator begin ()
 
LineIterator end ()
 
LineConstIterator begin () const
 
LineConstIterator end () const
 
Lineoperator[] (Index i)
 
const Lineoperator[] (Index i) const
 
void resize (Index nbRow, Index nbCol) override
 Resize the matrix and reset all values to 0. More...
 
Index rowSize (void) const override
 Number of rows. More...
 
Index colSize (void) const override
 Number of columns. More...
 
SReal element (Index i, Index j) const override
 Read the value of the element at row i, column j (using 0-based indices) More...
 
void set (Index i, Index j, double v) override
 Write the value of the element at row i, column j (using 0-based indices) More...
 
void add (Index i, Index j, double v) override
 Add v to the existing value of the element at row i, column j (using 0-based indices) More...
 
void clear (Index i, Index j) override
 
void clearRow (Index i) override
 Reset all the values in row i to 0. More...
 
void clearCol (Index j) override
 Reset the all values in column j to 0. More...
 
void clearRowCol (Index i) override
 Reset the value of both row and column i to 0. More...
 
void clear () override
 Reset all values to 0. More...
 
template<class Real2 >
void mul (FullVector< Real2 > &res, const FullVector< Real2 > &v) const
 
template<class Real2 >
void addMulTranspose (FullVector< Real2 > &res, const FullVector< Real2 > &v) const
 
template<class Real2 >
void mul (FullVector< Real2 > &res, const linearalgebra::BaseVector *v) const
 
template<class Real2 >
void addMulTranspose (FullVector< Real2 > &res, const linearalgebra::BaseVector *v) const
 
template<class Real2 >
void mul (linearalgebra::BaseVector *res, const FullVector< Real2 > &v) const
 
template<class Real2 >
void addMulTranspose (linearalgebra::BaseVector *res, const FullVector< Real2 > &v) const
 
void mul (linearalgebra::BaseVector *res, const linearalgebra::BaseVector *v) const
 
void addMulTranspose (linearalgebra::BaseVector *res, const linearalgebra::BaseVector *v) const
 
template<class Real2 >
FullVector< Real2 > operator* (const FullVector< Real2 > &v) const
 
MatrixExpr< MatrixTranspose< SparseMatrix< T > > > t () const
 
MatrixExpr< MatrixNegative< SparseMatrix< T > > > operator- () const
 
template<class Real2 >
MatrixExpr< MatrixProduct< SparseMatrix< T >, SparseMatrix< Real2 > > > operator* (const SparseMatrix< Real2 > &m) const
 
MatrixExpr< MatrixScale< SparseMatrix< T >, double > > operator* (const double &r) const
 
template<class Real2 >
MatrixExpr< MatrixAddition< SparseMatrix< T >, SparseMatrix< Real2 > > > operator+ (const SparseMatrix< Real2 > &m) const
 
template<class Real2 >
MatrixExpr< MatrixAddition< SparseMatrix< T >, SparseMatrix< Real2 > > > operator- (const SparseMatrix< Real2 > &m) const
 
void swap (SparseMatrix< T > &m)
 
template<class M2 >
bool hasRef (const M2 *m) const
 
std::string expr () const
 
bool valid () const
 
template<class Dest >
void addTo (Dest *dest) const
 
template<class Real2 >
void operator= (const SparseMatrix< Real2 > &m)
 
template<class Real2 >
void operator+= (const SparseMatrix< Real2 > &m)
 
template<class Real2 >
void operator-= (const SparseMatrix< Real2 > &m)
 
template<class Expr2 >
void operator= (const MatrixExpr< Expr2 > &m)
 
template<class Expr2 >
void operator+= (const MatrixExpr< Expr2 > &m)
 
template<class Expr2 >
void operator-= (const MatrixExpr< Expr2 > &m)
 
const charName ()
 
const charName ()
 
virtual void add (Index row, Index col, double v)=0
 Add v to the existing value of the element at row i, column j (using 0-based indices) More...
 
virtual void add (Index row, Index col, const type::Mat3x3d &_M)
 Adding values from a 3x3d matrix. This function may be overload to obtain better performances. More...
 
virtual void add (Index row, Index col, const type::Mat3x3f &_M)
 Adding values from a 3x3f matrix. This function may be overload to obtain better performances. More...
 
virtual void add (Index row, Index col, const type::Mat2x2d &_M)
 Adding values from a 2x2d matrix. This function may be overload to obtain better performances. More...
 
virtual void add (Index row, Index col, const type::Mat2x2f &_M)
 Adding values from a 2x2f matrix. This function may be overload to obtain better performances. More...
 
virtual void add (Index row, Index col, const type::Mat6x6d &_M)
 Adding values from a 6x6d matrix. This function may be overload to obtain better performances. More...
 
virtual void add (Index row, Index col, const type::Mat6x6f &_M)
 Adding values from a 6x6f matrix. This function may be overload to obtain better performances. More...
 
- Public Member Functions inherited from sofa::linearalgebra::BaseMatrix
 BaseMatrix ()
 
virtual ~BaseMatrix ()
 
Index rows (void) const
 Number of rows (Eigen-compatible API) More...
 
Index cols (void) const
 Number of columns (Eigen-compatible API) More...
 
SReal operator() (Index i, Index j) const
 Read the value of the element at row i, column j (using 0-based indices). Eigen-compatible API. More...
 
virtual void add (Index row, Index col, const type::Mat3x3d &_M)
 Adding values from a 3x3d matrix. This function may be overload to obtain better performances. More...
 
virtual void add (Index row, Index col, const type::Mat3x3f &_M)
 Adding values from a 3x3f matrix. This function may be overload to obtain better performances. More...
 
virtual void add (Index row, Index col, const type::Mat2x2d &_M)
 Adding values from a 2x2d matrix. This function may be overload to obtain better performances. More...
 
virtual void add (Index row, Index col, const type::Mat2x2f &_M)
 Adding values from a 2x2f matrix. This function may be overload to obtain better performances. More...
 
virtual void add (Index row, Index col, const type::Mat6x6d &_M)
 Adding values from a 6x6d matrix. This function may be overload to obtain better performances. More...
 
virtual void add (Index row, Index col, const type::Mat6x6f &_M)
 Adding values from a 6x6f matrix. This function may be overload to obtain better performances. More...
 
virtual void clearRows (Index imin, Index imax)
 Clears the value of rows imin to imax-1. More...
 
virtual void clearCols (Index imin, Index imax)
 Clears all the values in columns imin to imax-1. More...
 
virtual void clearRowsCols (Index imin, Index imax)
 Clears all the values in rows imin to imax-1 and columns imin to imax-1. More...
 
virtual void compress ()
 
virtual void opMulV (linearalgebra::BaseVector *result, const linearalgebra::BaseVector *v) const
 Multiply the matrix by vector v and put the result in vector result. More...
 
virtual void opMulV (float *result, const float *v) const
 Multiply the matrix by float vector v and put the result in vector result. More...
 
virtual void opMulV (double *result, const double *v) const
 Multiply the matrix by double vector v and put the result in vector result. More...
 
virtual void opPMulV (linearalgebra::BaseVector *result, const linearalgebra::BaseVector *v) const
 Multiply the matrix by vector v and add the result in vector result. More...
 
virtual void opPMulV (float *result, const float *v) const
 Multiply the matrix by float vector v and add the result in vector result. More...
 
virtual void opPMulV (double *result, const double *v) const
 Multiply the matrix by double vector v and add the result in vector result. More...
 
virtual void opMulTV (linearalgebra::BaseVector *result, const linearalgebra::BaseVector *v) const
 Multiply the transposed matrix by vector v and put the result in vector result. More...
 
virtual void opMulTV (float *result, const float *v) const
 Multiply the transposed matrix by float vector v and put the result in vector result. More...
 
virtual void opMulTV (double *result, const double *v) const
 Multiply the transposed matrix by double vector v and put the result in vector result. More...
 
virtual void opPMulTV (linearalgebra::BaseVector *result, const linearalgebra::BaseVector *v) const
 Multiply the transposed matrix by vector v and add the result in vector result. More...
 
virtual void opPMulTV (float *result, const float *v) const
 Multiply the transposed matrix by float vector v and add the result in vector result. More...
 
virtual void opPMulTV (double *result, const double *v) const
 Multiply the transposed matrix by double vector v and add the result in vector result. More...
 
virtual void opMulTM (BaseMatrix *result, BaseMatrix *m) const
 Multiply the transposed matrix by matrix m and store the result in matrix result. More...
 
virtual void opAddM (linearalgebra::BaseMatrix *m, double fact) const
 Subtract the matrix to the m matrix and strore the result in m. More...
 
virtual void opAddMT (linearalgebra::BaseMatrix *m, double fact) const
 Subtract the transposed matrix to the m matrix and strore the result in m. More...
 
virtual ElementType getElementType () const
 
virtual std::size_t getElementSize () const
 
virtual MatrixCategory getCategory () const
 
virtual Index getBlockRows () const
 
virtual Index getBlockCols () const
 
virtual Index bRowSize () const
 
virtual Index bColSize () const
 
virtual Index getBandWidth () const
 
bool isDiagonal () const
 
bool isBlockDiagonal () const
 
bool isBand () const
 
bool isSparse () const
 
virtual BlockConstAccessor blocGet (Index i, Index j) const
 Get read access to a block. More...
 
virtual BlockAccessor blocGetW (Index i, Index j)
 Get write access to a block. More...
 
virtual BlockAccessor blocCreate (Index i, Index j)
 Get write access to a block, possibly creating it. More...
 
template<class T >
const T * blocElements (Index i, Index j, T *buffer) const
 Shortcut for blocGet(i,j).elements(buffer) More...
 
template<class T >
void blocSet (Index i, Index j, const T *buffer)
 Shortcut for blocCreate(i,j).set(buffer) More...
 
template<class T >
void blocAdd (Index i, Index j, const T *buffer)
 Shortcut for blocCreate(i,j).add(buffer) More...
 
virtual ColBlockConstIterator bRowBegin (Index ib) const
 Get the iterator corresponding to the beginning of the given row of blocks. More...
 
virtual ColBlockConstIterator bRowEnd (Index ib) const
 Get the iterator corresponding to the end of the given row of blocks. More...
 
virtual std::pair< ColBlockConstIterator, ColBlockConstIteratorbRowRange (Index ib) const
 Get the iterators corresponding to the beginning and end of the given row of blocks. More...
 
virtual RowBlockConstIterator bRowsBegin () const
 Get the iterator corresponding to the beginning of the rows of blocks. More...
 
virtual RowBlockConstIterator bRowsEnd () const
 Get the iterator corresponding to the end of the rows of blocks. More...
 
virtual std::pair< RowBlockConstIterator, RowBlockConstIteratorbRowsRange () const
 Get the iterators corresponding to the beginning and end of the given row of blocks. More...
 

Static Public Member Functions

static const charName ()
 

Protected Member Functions

template<class M >
void equal (const M &m, bool add=false)
 
template<class M >
void addEqual (const M &m)
 this += m More...
 
- Protected Member Functions inherited from sofa::linearalgebra::BaseMatrix
virtual void bAccessorDelete (const InternalBlockAccessor *) const
 
virtual void bAccessorCopy (InternalBlockAccessor *) const
 
virtual SReal bAccessorElement (const InternalBlockAccessor *b, Index i, Index j) const
 
virtual void bAccessorSet (InternalBlockAccessor *b, Index i, Index j, double v)
 
virtual void bAccessorAdd (InternalBlockAccessor *b, Index i, Index j, double v)
 
template<class T >
const T * bAccessorElementsDefaultImpl (const InternalBlockAccessor *b, T *buffer) const
 
virtual const floatbAccessorElements (const InternalBlockAccessor *b, float *buffer) const
 
virtual const double * bAccessorElements (const InternalBlockAccessor *b, double *buffer) const
 
virtual const int * bAccessorElements (const InternalBlockAccessor *b, int *buffer) const
 
template<class T >
void bAccessorSetDefaultImpl (InternalBlockAccessor *b, const T *buffer)
 
virtual void bAccessorSet (InternalBlockAccessor *b, const float *buffer)
 
virtual void bAccessorSet (InternalBlockAccessor *b, const double *buffer)
 
virtual void bAccessorSet (InternalBlockAccessor *b, const int *buffer)
 
template<class T >
void bAccessorAddDefaultImpl (InternalBlockAccessor *b, const T *buffer)
 
virtual void bAccessorAdd (InternalBlockAccessor *b, const float *buffer)
 
virtual void bAccessorAdd (InternalBlockAccessor *b, const double *buffer)
 
virtual void bAccessorAdd (InternalBlockAccessor *b, const int *buffer)
 
template<class T >
T * bAccessorPrepareAddDefaultImpl (InternalBlockAccessor *, T *buffer)
 
virtual floatbAccessorPrepareAdd (InternalBlockAccessor *b, float *buffer)
 
virtual double * bAccessorPrepareAdd (InternalBlockAccessor *b, double *buffer)
 
virtual int * bAccessorPrepareAdd (InternalBlockAccessor *b, int *buffer)
 
virtual void bAccessorFinishAdd (InternalBlockAccessor *b, const float *buffer)
 
virtual void bAccessorFinishAdd (InternalBlockAccessor *b, const double *buffer)
 
virtual void bAccessorFinishAdd (InternalBlockAccessor *b, const int *buffer)
 
BlockAccessor createBlockAccessor (Index row, Index col, void *internalPtr=nullptr)
 
BlockAccessor createBlockAccessor (Index row, Index col, Index internalData)
 
BlockConstAccessor createBlockConstAccessor (Index row, Index col, void *internalPtr=nullptr) const
 
BlockConstAccessor createBlockConstAccessor (Index row, Index col, Index internalData) const
 
void setMatrix (BlockAccessor *b)
 
void setMatrix (BlockConstAccessor *b) const
 
virtual void itCopyColBlock (InternalColBlockIterator *) const
 
virtual void itDeleteColBlock (const InternalColBlockIterator *) const
 
virtual void itAccessColBlock (InternalColBlockIterator *it, BlockConstAccessor *b) const
 
virtual void itIncColBlock (InternalColBlockIterator *it) const
 
virtual void itDecColBlock (InternalColBlockIterator *it) const
 
virtual bool itEqColBlock (const InternalColBlockIterator *it, const InternalColBlockIterator *it2) const
 
virtual bool itLessColBlock (const InternalColBlockIterator *it, const InternalColBlockIterator *it2) const
 
ColBlockConstIterator createColBlockConstIterator (Index row, void *internalPtr) const
 
ColBlockConstIterator createColBlockConstIterator (Index row, Index internalData) const
 
virtual void itCopyRowBlock (InternalRowBlockIterator *) const
 
virtual void itDeleteRowBlock (const InternalRowBlockIterator *) const
 
virtual Index itAccessRowBlock (InternalRowBlockIterator *it) const
 
virtual ColBlockConstIterator itBeginRowBlock (InternalRowBlockIterator *it) const
 
virtual ColBlockConstIterator itEndRowBlock (InternalRowBlockIterator *it) const
 
virtual std::pair< ColBlockConstIterator, ColBlockConstIteratoritRangeRowBlock (InternalRowBlockIterator *it) const
 
virtual void itIncRowBlock (InternalRowBlockIterator *it) const
 
virtual void itDecRowBlock (InternalRowBlockIterator *it) const
 
virtual bool itEqRowBlock (const InternalRowBlockIterator *it, const InternalRowBlockIterator *it2) const
 
virtual bool itLessRowBlock (const InternalRowBlockIterator *it, const InternalRowBlockIterator *it2) const
 
RowBlockConstIterator createRowBlockConstIterator (void *internalPtr) const
 
RowBlockConstIterator createRowBlockConstIterator (Index internalData0, Index internalData1) const
 

Additional Inherited Members

- Static Protected Member Functions inherited from sofa::linearalgebra::BaseMatrix
static InternalBlockAccessorgetInternal (BlockConstAccessor *b)
 
static const InternalBlockAccessorgetInternal (const BlockConstAccessor *b)
 
static InternalBlockAccessorgetInternal (BlockAccessor *b)
 
static const InternalBlockAccessorgetInternal (const BlockAccessor *b)
 
static InternalColBlockIteratorgetInternal (ColBlockConstIterator *b)
 
static const InternalColBlockIteratorgetInternal (const ColBlockConstIterator *b)
 
static InternalRowBlockIteratorgetInternal (RowBlockConstIterator *b)
 
static const InternalRowBlockIteratorgetInternal (const RowBlockConstIterator *b)
 

Attribute details

◆ data

template<typename T >
Data sofa::linearalgebra::SparseMatrix< T >::data
protected

◆ nCol

template<typename T >
Index sofa::linearalgebra::SparseMatrix< T >::nCol
protected

◆ nRow

template<typename T >
Index sofa::linearalgebra::SparseMatrix< T >::nRow
protected

Constructor details

◆ SparseMatrix() [1/2]

template<typename T >
sofa::linearalgebra::SparseMatrix< T >::SparseMatrix ( )
inline

◆ SparseMatrix() [2/2]

template<typename T >
sofa::linearalgebra::SparseMatrix< T >::SparseMatrix ( Index  nbRow,
Index  nbCol 
)
inline

Function details

◆ add() [1/8]

template<typename T >
void sofa::linearalgebra::SparseMatrix< T >::add ( Index  row,
Index  col,
double  v 
)
inlineoverridevirtual

Add v to the existing value of the element at row i, column j (using 0-based indices)

Implements sofa::linearalgebra::BaseMatrix.

◆ add() [2/8]

template<typename T >
void sofa::linearalgebra::BaseMatrix::add

Adding values from a 2x2d matrix. This function may be overload to obtain better performances.

Adding values from a 2x2d matrix this function may be overload to obtain better performances.

◆ add() [3/8]

template<typename T >
void sofa::linearalgebra::BaseMatrix::add

Adding values from a 2x2f matrix. This function may be overload to obtain better performances.

Adding values from a 2x2f matrix this function may be overload to obtain better performances.

◆ add() [4/8]

template<typename T >
void sofa::linearalgebra::BaseMatrix::add

Adding values from a 3x3d matrix. This function may be overload to obtain better performances.

Adding values from a 3x3d matrix this function may be overload to obtain better performances.

◆ add() [5/8]

template<typename T >
void sofa::linearalgebra::BaseMatrix::add

Adding values from a 3x3f matrix. This function may be overload to obtain better performances.

Adding values from a 3x3f matrix this function may be overload to obtain better performances.

◆ add() [6/8]

template<typename T >
void sofa::linearalgebra::BaseMatrix::add

Adding values from a 6x6d matrix. This function may be overload to obtain better performances.

◆ add() [7/8]

template<typename T >
void sofa::linearalgebra::BaseMatrix::add

Adding values from a 6x6f matrix. This function may be overload to obtain better performances.

◆ add() [8/8]

template<typename T >
virtual void sofa::linearalgebra::BaseMatrix::add

Add v to the existing value of the element at row i, column j (using 0-based indices)

◆ addEqual()

template<typename T >
template<class M >
void sofa::linearalgebra::SparseMatrix< T >::addEqual ( const M &  m)
inlineprotected

this += m

◆ addMulTranspose() [1/4]

template<typename T >
template<class Real2 >
void sofa::linearalgebra::SparseMatrix< T >::addMulTranspose ( FullVector< Real2 > &  res,
const FullVector< Real2 > &  v 
) const
inline

◆ addMulTranspose() [2/4]

template<typename T >
template<class Real2 >
void sofa::linearalgebra::SparseMatrix< T >::addMulTranspose ( FullVector< Real2 > &  res,
const linearalgebra::BaseVector v 
) const
inline

◆ addMulTranspose() [3/4]

template<typename T >
template<class Real2 >
void sofa::linearalgebra::SparseMatrix< T >::addMulTranspose ( linearalgebra::BaseVector res,
const FullVector< Real2 > &  v 
) const
inline

◆ addMulTranspose() [4/4]

template<typename T >
void sofa::linearalgebra::SparseMatrix< T >::addMulTranspose ( linearalgebra::BaseVector res,
const linearalgebra::BaseVector v 
) const
inline

◆ addTo()

template<typename T >
template<class Dest >
void sofa::linearalgebra::SparseMatrix< T >::addTo ( Dest *  dest) const
inline

◆ begin() [1/2]

template<typename T >
LineIterator sofa::linearalgebra::SparseMatrix< T >::begin ( )
inline

◆ begin() [2/2]

template<typename T >
LineConstIterator sofa::linearalgebra::SparseMatrix< T >::begin ( ) const
inline

◆ clear() [1/2]

template<typename T >
void sofa::linearalgebra::SparseMatrix< T >::clear ( )
inlineoverridevirtual

Reset all values to 0.

Implements sofa::linearalgebra::BaseMatrix.

◆ clear() [2/2]

template<typename T >
void sofa::linearalgebra::SparseMatrix< T >::clear ( Index  i,
Index  j 
)
inlineoverridevirtual

Reimplemented from sofa::linearalgebra::BaseMatrix.

◆ clearCol()

template<typename T >
void sofa::linearalgebra::SparseMatrix< T >::clearCol ( Index  j)
inlineoverridevirtual

Reset the all values in column j to 0.

Reimplemented from sofa::linearalgebra::BaseMatrix.

◆ clearRow()

template<typename T >
void sofa::linearalgebra::SparseMatrix< T >::clearRow ( Index  i)
inlineoverridevirtual

Reset all the values in row i to 0.

Reimplemented from sofa::linearalgebra::BaseMatrix.

◆ clearRowCol()

template<typename T >
void sofa::linearalgebra::SparseMatrix< T >::clearRowCol ( Index  i)
inlineoverridevirtual

Reset the value of both row and column i to 0.

Reimplemented from sofa::linearalgebra::BaseMatrix.

◆ colSize()

template<typename T >
Index sofa::linearalgebra::SparseMatrix< T >::colSize ( void  ) const
inlineoverridevirtual

Number of columns.

Implements sofa::linearalgebra::BaseMatrix.

◆ element()

template<typename T >
SReal sofa::linearalgebra::SparseMatrix< T >::element ( Index  i,
Index  j 
) const
inlineoverridevirtual

Read the value of the element at row i, column j (using 0-based indices)

Implements sofa::linearalgebra::BaseMatrix.

◆ end() [1/2]

template<typename T >
LineIterator sofa::linearalgebra::SparseMatrix< T >::end ( )
inline

◆ end() [2/2]

template<typename T >
LineConstIterator sofa::linearalgebra::SparseMatrix< T >::end ( ) const
inline

◆ equal()

template<typename T >
template<class M >
void sofa::linearalgebra::SparseMatrix< T >::equal ( const M &  m,
bool  add = false 
)
inlineprotected

◆ expr()

template<typename T >
std::string sofa::linearalgebra::SparseMatrix< T >::expr ( ) const
inline

◆ hasRef()

template<typename T >
template<class M2 >
bool sofa::linearalgebra::SparseMatrix< T >::hasRef ( const M2 *  m) const
inline

◆ mul() [1/4]

template<typename T >
template<class Real2 >
void sofa::linearalgebra::SparseMatrix< T >::mul ( FullVector< Real2 > &  res,
const FullVector< Real2 > &  v 
) const
inline

◆ mul() [2/4]

template<typename T >
template<class Real2 >
void sofa::linearalgebra::SparseMatrix< T >::mul ( FullVector< Real2 > &  res,
const linearalgebra::BaseVector v 
) const
inline

◆ mul() [3/4]

template<typename T >
template<class Real2 >
void sofa::linearalgebra::SparseMatrix< T >::mul ( linearalgebra::BaseVector res,
const FullVector< Real2 > &  v 
) const
inline

◆ mul() [4/4]

template<typename T >
void sofa::linearalgebra::SparseMatrix< T >::mul ( linearalgebra::BaseVector res,
const linearalgebra::BaseVector v 
) const
inline

◆ Name() [1/3]

template<typename T >
static const char* sofa::linearalgebra::SparseMatrix< T >::Name ( )
static

◆ Name() [2/3]

const char * sofa::linearalgebra::SparseMatrix< double >::Name ( )
inline

◆ Name() [3/3]

const char * sofa::linearalgebra::SparseMatrix< float >::Name ( )
inline

◆ operator*() [1/3]

template<typename T >
MatrixExpr< MatrixScale< SparseMatrix<T>, double > > sofa::linearalgebra::SparseMatrix< T >::operator* ( const double &  r) const
inline

◆ operator*() [2/3]

template<typename T >
template<class Real2 >
FullVector<Real2> sofa::linearalgebra::SparseMatrix< T >::operator* ( const FullVector< Real2 > &  v) const
inline

◆ operator*() [3/3]

template<typename T >
template<class Real2 >
MatrixExpr< MatrixProduct< SparseMatrix<T>, SparseMatrix<Real2> > > sofa::linearalgebra::SparseMatrix< T >::operator* ( const SparseMatrix< Real2 > &  m) const
inline

◆ operator+()

template<typename T >
template<class Real2 >
MatrixExpr< MatrixAddition< SparseMatrix<T>, SparseMatrix<Real2> > > sofa::linearalgebra::SparseMatrix< T >::operator+ ( const SparseMatrix< Real2 > &  m) const
inline

◆ operator+=() [1/2]

template<typename T >
template<class Expr2 >
void sofa::linearalgebra::SparseMatrix< T >::operator+= ( const MatrixExpr< Expr2 > &  m)
inline

◆ operator+=() [2/2]

template<typename T >
template<class Real2 >
void sofa::linearalgebra::SparseMatrix< T >::operator+= ( const SparseMatrix< Real2 > &  m)
inline

◆ operator-() [1/2]

template<typename T >
MatrixExpr< MatrixNegative< SparseMatrix<T> > > sofa::linearalgebra::SparseMatrix< T >::operator- ( ) const
inline

◆ operator-() [2/2]

template<typename T >
template<class Real2 >
MatrixExpr< MatrixAddition< SparseMatrix<T>, SparseMatrix<Real2> > > sofa::linearalgebra::SparseMatrix< T >::operator- ( const SparseMatrix< Real2 > &  m) const
inline

◆ operator-=() [1/2]

template<typename T >
template<class Expr2 >
void sofa::linearalgebra::SparseMatrix< T >::operator-= ( const MatrixExpr< Expr2 > &  m)
inline

◆ operator-=() [2/2]

template<typename T >
template<class Real2 >
void sofa::linearalgebra::SparseMatrix< T >::operator-= ( const SparseMatrix< Real2 > &  m)
inline

◆ operator=() [1/2]

template<typename T >
template<class Expr2 >
void sofa::linearalgebra::SparseMatrix< T >::operator= ( const MatrixExpr< Expr2 > &  m)
inline

◆ operator=() [2/2]

template<typename T >
template<class Real2 >
void sofa::linearalgebra::SparseMatrix< T >::operator= ( const SparseMatrix< Real2 > &  m)
inline

◆ operator[]() [1/2]

template<typename T >
Line& sofa::linearalgebra::SparseMatrix< T >::operator[] ( Index  i)
inline

◆ operator[]() [2/2]

template<typename T >
const Line& sofa::linearalgebra::SparseMatrix< T >::operator[] ( Index  i) const
inline

◆ resize()

template<typename T >
void sofa::linearalgebra::SparseMatrix< T >::resize ( Index  nbRow,
Index  nbCol 
)
inlineoverridevirtual

Resize the matrix and reset all values to 0.

Implements sofa::linearalgebra::BaseMatrix.

◆ rowSize()

template<typename T >
Index sofa::linearalgebra::SparseMatrix< T >::rowSize ( void  ) const
inlineoverridevirtual

Number of rows.

Implements sofa::linearalgebra::BaseMatrix.

◆ set()

template<typename T >
void sofa::linearalgebra::SparseMatrix< T >::set ( Index  i,
Index  j,
double  v 
)
inlineoverridevirtual

Write the value of the element at row i, column j (using 0-based indices)

Implements sofa::linearalgebra::BaseMatrix.

◆ swap()

template<typename T >
void sofa::linearalgebra::SparseMatrix< T >::swap ( SparseMatrix< T > &  m)
inline

◆ t()

template<typename T >
MatrixExpr< MatrixTranspose< SparseMatrix<T> > > sofa::linearalgebra::SparseMatrix< T >::t ( ) const
inline

◆ valid()

template<typename T >
bool sofa::linearalgebra::SparseMatrix< T >::valid ( ) const
inline

Enum details

◆ anonymous enum

template<typename T >
anonymous enum
Enumerator
category 

◆ anonymous enum

template<typename T >
anonymous enum
Enumerator
operand