SOFA API  dff7824e
Open source framework for multi-physics simuation
sofa::linearalgebra::BaseMatrix Class Referenceabstract

#include <BaseMatrix.h>

Inheritance diagram for sofa::linearalgebra::BaseMatrix:

Detailed Description

Generic matrix API, allowing to fill and use a matrix independently of the linear algebra library in use.

Note that accessing values using this class is rather slow and should only be used in codes where the provided genericity is necessary.

Classes

class  BlockAccessor
 
class  BlockConstAccessor
 
class  ColBlockConstIterator
 
class  InternalBlockAccessor
 
class  InternalColBlockIterator
 
class  InternalRowBlockIterator
 
class  RowBlockConstIterator
 

Public Member Functions

 BaseMatrix ()
 
virtual ~BaseMatrix ()
 
virtual Index rowSize (void) const =0
 Number of rows. More...
 
virtual Index colSize (void) const =0
 Number of columns. More...
 
Index rows (void) const
 Number of rows (Eigen-compatible API) More...
 
Index cols (void) const
 Number of columns (Eigen-compatible API) More...
 
virtual SReal element (Index i, Index j) const =0
 Read the value of the element at row i, column j (using 0-based indices) 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 resize (Index nbRow, Index nbCol)=0
 Resize the matrix and reset all values to 0. More...
 
virtual void clear ()=0
 Reset all values to 0. More...
 
virtual void set (Index i, Index j, double v)=0
 Write the value of the element at row i, column j (using 0-based indices) More...
 
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 clear (Index i, Index j)
 
virtual void clearRow (Index i)
 Reset all the values in row i to 0. More...
 
virtual void clearRows (Index imin, Index imax)
 Clears the value of rows imin to imax-1. More...
 
virtual void clearCol (Index j)
 Reset the all values in column j to 0. More...
 
virtual void clearCols (Index imin, Index imax)
 Clears all the values in columns imin to imax-1. More...
 
virtual void clearRowCol (Index i)
 Reset the value of both row and column i to 0. 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 ()
 
basic linear operations
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...
 

Friends

SOFA_LINEARALGEBRA_API std::ostream & operator<< (std::ostream &out, const sofa::linearalgebra::BaseMatrix &m)
 Declare that the operator << is friend so they can use private data. More...
 
SOFA_LINEARALGEBRA_API std::istream & operator>> (std::istream &in, sofa::linearalgebra::BaseMatrix &m)
 Declare that the operator >> is friend so they can use private data. More...
 

Get information about the content and structure of this matrix (diagonal, band, sparse, full, block size, ...)

enum  ElementType { ELEMENT_UNKNOWN = 0, ELEMENT_FLOAT, ELEMENT_INT }
 
enum  MatrixCategory {
  MATRIX_UNKNOWN = 0, MATRIX_IDENTITY, MATRIX_DIAGONAL, MATRIX_BAND,
  MATRIX_SPARSE, MATRIX_FULL
}
 
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 iterator classes and methods

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 TblocElements (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...
 
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 TbAccessorElementsDefaultImpl (const InternalBlockAccessor *b, T *buffer) const
 
virtual const floatbAccessorElements (const InternalBlockAccessor *b, float *buffer) const
 
virtual const doublebAccessorElements (const InternalBlockAccessor *b, double *buffer) const
 
virtual const intbAccessorElements (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 >
TbAccessorPrepareAddDefaultImpl (InternalBlockAccessor *, T *buffer)
 
virtual floatbAccessorPrepareAdd (InternalBlockAccessor *b, float *buffer)
 
virtual doublebAccessorPrepareAdd (InternalBlockAccessor *b, double *buffer)
 
virtual intbAccessorPrepareAdd (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
 
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)
 

Constructor details

◆ BaseMatrix()

sofa::linearalgebra::BaseMatrix::BaseMatrix ( )

◆ ~BaseMatrix()

sofa::linearalgebra::BaseMatrix::~BaseMatrix ( )
virtual

Function details

◆ add() [1/5]

void sofa::linearalgebra::BaseMatrix::add ( Index  row,
Index  col,
const type::Mat2x2d _M 
)
virtual

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() [2/5]

void sofa::linearalgebra::BaseMatrix::add ( Index  row,
Index  col,
const type::Mat2x2f _M 
)
virtual

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() [3/5]

void sofa::linearalgebra::BaseMatrix::add ( Index  row,
Index  col,
const type::Mat3x3d _M 
)
virtual

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.

Reimplemented in sofa::linearalgebra::CompressedRowSparseMatrix< TBlock, TVecBlock, TVecIndex >, sofa::linearalgebra::CompressedRowSparseMatrix< sofa::type::Mat< NL, NC, MReal > >, sofa::linearalgebra::CompressedRowSparseMatrix< MReal >, sofa::linearalgebra::CompressedRowSparseMatrix< BlockNM >, sofa::linearalgebra::CompressedRowSparseMatrix< BlockMM >, sofa::linearalgebra::CompressedRowSparseMatrix< BlockNN >, sofa::linearalgebra::CompressedRowSparseMatrix< BlockMN >, sofa::linearalgebra::CompressedRowSparseMatrix< Real >, sofa::linearalgebra::CompressedRowSparseMatrix< TBlock, TVecBlock, TVecIndex >, sofa::linearalgebra::CompressedRowSparseMatrix< sofa::type::Mat< NL, NC, MReal > >, sofa::linearalgebra::CompressedRowSparseMatrix< MReal >, sofa::linearalgebra::CompressedRowSparseMatrix< BlockNM >, sofa::linearalgebra::CompressedRowSparseMatrix< BlockMM >, sofa::linearalgebra::CompressedRowSparseMatrix< BlockNN >, sofa::linearalgebra::CompressedRowSparseMatrix< BlockMN >, sofa::linearalgebra::CompressedRowSparseMatrix< Real >, sofa::linearalgebra::CompressedRowSparseMatrix< TBlock, TVecBlock, TVecIndex >, sofa::linearalgebra::CompressedRowSparseMatrix< sofa::type::Mat< NL, NC, MReal > >, sofa::linearalgebra::CompressedRowSparseMatrix< MReal >, sofa::linearalgebra::CompressedRowSparseMatrix< BlockNM >, sofa::linearalgebra::CompressedRowSparseMatrix< BlockMM >, sofa::linearalgebra::CompressedRowSparseMatrix< BlockNN >, sofa::linearalgebra::CompressedRowSparseMatrix< BlockMN >, sofa::linearalgebra::CompressedRowSparseMatrix< Real >, sofa::linearalgebra::CompressedRowSparseMatrix< TBlock, TVecBlock, TVecIndex >, sofa::linearalgebra::CompressedRowSparseMatrix< sofa::type::Mat< NL, NC, MReal > >, sofa::linearalgebra::CompressedRowSparseMatrix< MReal >, sofa::linearalgebra::CompressedRowSparseMatrix< BlockNM >, sofa::linearalgebra::CompressedRowSparseMatrix< BlockMM >, sofa::linearalgebra::CompressedRowSparseMatrix< BlockNN >, sofa::linearalgebra::CompressedRowSparseMatrix< BlockMN >, sofa::linearalgebra::CompressedRowSparseMatrix< Real >, sofa::linearalgebra::CompressedRowSparseMatrix< TBlock, TVecBlock, TVecIndex >, sofa::linearalgebra::CompressedRowSparseMatrix< sofa::type::Mat< NL, NC, MReal > >, sofa::linearalgebra::CompressedRowSparseMatrix< MReal >, sofa::linearalgebra::CompressedRowSparseMatrix< BlockNM >, sofa::linearalgebra::CompressedRowSparseMatrix< BlockMM >, sofa::linearalgebra::CompressedRowSparseMatrix< BlockNN >, sofa::linearalgebra::CompressedRowSparseMatrix< BlockMN >, and sofa::linearalgebra::CompressedRowSparseMatrix< Real >.

◆ add() [4/5]

void sofa::linearalgebra::BaseMatrix::add ( Index  row,
Index  col,
const type::Mat3x3f _M 
)
virtual

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.

Reimplemented in sofa::linearalgebra::CompressedRowSparseMatrix< TBlock, TVecBlock, TVecIndex >, sofa::linearalgebra::CompressedRowSparseMatrix< sofa::type::Mat< NL, NC, MReal > >, sofa::linearalgebra::CompressedRowSparseMatrix< MReal >, sofa::linearalgebra::CompressedRowSparseMatrix< BlockNM >, sofa::linearalgebra::CompressedRowSparseMatrix< BlockMM >, sofa::linearalgebra::CompressedRowSparseMatrix< BlockNN >, sofa::linearalgebra::CompressedRowSparseMatrix< BlockMN >, sofa::linearalgebra::CompressedRowSparseMatrix< Real >, sofa::linearalgebra::CompressedRowSparseMatrix< TBlock, TVecBlock, TVecIndex >, sofa::linearalgebra::CompressedRowSparseMatrix< sofa::type::Mat< NL, NC, MReal > >, sofa::linearalgebra::CompressedRowSparseMatrix< MReal >, sofa::linearalgebra::CompressedRowSparseMatrix< BlockNM >, sofa::linearalgebra::CompressedRowSparseMatrix< BlockMM >, sofa::linearalgebra::CompressedRowSparseMatrix< BlockNN >, sofa::linearalgebra::CompressedRowSparseMatrix< BlockMN >, sofa::linearalgebra::CompressedRowSparseMatrix< Real >, sofa::linearalgebra::CompressedRowSparseMatrix< TBlock, TVecBlock, TVecIndex >, sofa::linearalgebra::CompressedRowSparseMatrix< sofa::type::Mat< NL, NC, MReal > >, sofa::linearalgebra::CompressedRowSparseMatrix< MReal >, sofa::linearalgebra::CompressedRowSparseMatrix< BlockNM >, sofa::linearalgebra::CompressedRowSparseMatrix< BlockMM >, sofa::linearalgebra::CompressedRowSparseMatrix< BlockNN >, sofa::linearalgebra::CompressedRowSparseMatrix< BlockMN >, sofa::linearalgebra::CompressedRowSparseMatrix< Real >, sofa::linearalgebra::CompressedRowSparseMatrix< TBlock, TVecBlock, TVecIndex >, sofa::linearalgebra::CompressedRowSparseMatrix< sofa::type::Mat< NL, NC, MReal > >, sofa::linearalgebra::CompressedRowSparseMatrix< MReal >, sofa::linearalgebra::CompressedRowSparseMatrix< BlockNM >, sofa::linearalgebra::CompressedRowSparseMatrix< BlockMM >, sofa::linearalgebra::CompressedRowSparseMatrix< BlockNN >, sofa::linearalgebra::CompressedRowSparseMatrix< BlockMN >, sofa::linearalgebra::CompressedRowSparseMatrix< Real >, sofa::linearalgebra::CompressedRowSparseMatrix< TBlock, TVecBlock, TVecIndex >, sofa::linearalgebra::CompressedRowSparseMatrix< sofa::type::Mat< NL, NC, MReal > >, sofa::linearalgebra::CompressedRowSparseMatrix< MReal >, sofa::linearalgebra::CompressedRowSparseMatrix< BlockNM >, sofa::linearalgebra::CompressedRowSparseMatrix< BlockMM >, sofa::linearalgebra::CompressedRowSparseMatrix< BlockNN >, sofa::linearalgebra::CompressedRowSparseMatrix< BlockMN >, and sofa::linearalgebra::CompressedRowSparseMatrix< Real >.

◆ add() [5/5]

virtual void sofa::linearalgebra::BaseMatrix::add ( Index  row,
Index  col,
double  v 
)
pure virtual

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

Implemented in sofa::linearalgebra::RotationMatrix< TReal >, sofa::linearalgebra::EigenBaseSparseMatrix< TReal >, sofa::linearalgebra::EigenBaseSparseMatrix< TOut ::Real >, sofa::linearalgebra::EigenBaseSparseMatrix< OutTypes ::Real >, sofa::linearalgebra::EigenBaseSparseMatrix< OutDataTypes::Real >, sofa::linearalgebra::EigenBaseSparseMatrix< In ::Real >, sofa::linearalgebra::EigenBaseSparseMatrix< typename DataTypes::Real >, sofa::linearalgebra::EigenBaseSparseMatrix< TIn ::Real >, sofa::linearalgebra::EigenBaseSparseMatrix< DataTypes ::Real >, sofa::linearalgebra::EigenBaseSparseMatrix< Out ::Real >, sofa::linearalgebra::EigenBaseSparseMatrix< Real >, sofa::linearalgebra::CompressedRowSparseMatrix< TBlock, TVecBlock, TVecIndex >, sofa::linearalgebra::CompressedRowSparseMatrix< sofa::type::Mat< NL, NC, MReal > >, sofa::linearalgebra::CompressedRowSparseMatrix< MReal >, sofa::linearalgebra::CompressedRowSparseMatrix< BlockNM >, sofa::linearalgebra::CompressedRowSparseMatrix< BlockMM >, sofa::linearalgebra::CompressedRowSparseMatrix< BlockNN >, sofa::linearalgebra::CompressedRowSparseMatrix< BlockMN >, sofa::linearalgebra::CompressedRowSparseMatrix< Real >, sofa::linearalgebra::BTDMatrix< N, T >, sofa::linearalgebra::BlocFullMatrix< N, T >, sofa::linearalgebra::BlockDiagonalMatrix< LC, T >, sofa::linearalgebra::DiagonalMatrix< T >, sofa::linearalgebra::DiagonalMatrix< R1 >, sofa::linearalgebra::DiagonalMatrix< R2 >, sofa::linearalgebra::FullMatrix< T >, sofa::linearalgebra::FullMatrix< double >, sofa::linearalgebra::FullMatrix< typename Vector::Real >, sofa::linearalgebra::FullMatrix< SReal >, and sofa::linearalgebra::FullMatrix< Real >.

◆ bAccessorAdd() [1/4]

◆ bAccessorAdd() [2/4]

◆ bAccessorAdd() [3/4]

◆ bAccessorAdd() [4/4]

◆ bAccessorAddDefaultImpl()

template<class T >
void sofa::linearalgebra::BaseMatrix::bAccessorAddDefaultImpl ( InternalBlockAccessor b,
const T buffer 
)
inlineprotected

◆ bAccessorCopy()

◆ bAccessorDelete()

◆ bAccessorElement()

◆ bAccessorElements() [1/3]

◆ bAccessorElements() [2/3]

◆ bAccessorElements() [3/3]

◆ bAccessorElementsDefaultImpl()

template<class T >
const T* sofa::linearalgebra::BaseMatrix::bAccessorElementsDefaultImpl ( const InternalBlockAccessor b,
T buffer 
) const
inlineprotected

◆ bAccessorFinishAdd() [1/3]

virtual void sofa::linearalgebra::BaseMatrix::bAccessorFinishAdd ( InternalBlockAccessor b,
const double buffer 
)
inlineprotectedvirtual

◆ bAccessorFinishAdd() [2/3]

virtual void sofa::linearalgebra::BaseMatrix::bAccessorFinishAdd ( InternalBlockAccessor b,
const float buffer 
)
inlineprotectedvirtual

◆ bAccessorFinishAdd() [3/3]

virtual void sofa::linearalgebra::BaseMatrix::bAccessorFinishAdd ( InternalBlockAccessor b,
const int buffer 
)
inlineprotectedvirtual

◆ bAccessorPrepareAdd() [1/3]

virtual double* sofa::linearalgebra::BaseMatrix::bAccessorPrepareAdd ( InternalBlockAccessor b,
double buffer 
)
inlineprotectedvirtual

◆ bAccessorPrepareAdd() [2/3]

virtual float* sofa::linearalgebra::BaseMatrix::bAccessorPrepareAdd ( InternalBlockAccessor b,
float buffer 
)
inlineprotectedvirtual

◆ bAccessorPrepareAdd() [3/3]

virtual int* sofa::linearalgebra::BaseMatrix::bAccessorPrepareAdd ( InternalBlockAccessor b,
int buffer 
)
inlineprotectedvirtual

◆ bAccessorPrepareAddDefaultImpl()

template<class T >
T* sofa::linearalgebra::BaseMatrix::bAccessorPrepareAddDefaultImpl ( InternalBlockAccessor ,
T buffer 
)
inlineprotected

◆ bAccessorSet() [1/4]

◆ bAccessorSet() [2/4]

◆ bAccessorSet() [3/4]

◆ bAccessorSet() [4/4]

◆ bAccessorSetDefaultImpl()

template<class T >
void sofa::linearalgebra::BaseMatrix::bAccessorSetDefaultImpl ( InternalBlockAccessor b,
const T buffer 
)
inlineprotected

◆ bColSize()

virtual Index sofa::linearalgebra::BaseMatrix::bColSize ( ) const
inlinevirtual
Returns
the number of columns of blocks

Reimplemented in sofa::linearalgebra::CompressedRowSparseMatrix< TBlock, TVecBlock, TVecIndex >.

◆ blocAdd()

template<class T >
void sofa::linearalgebra::BaseMatrix::blocAdd ( Index  i,
Index  j,
const T buffer 
)
inline

Shortcut for blocCreate(i,j).add(buffer)

◆ blocCreate()

◆ blocElements()

template<class T >
const T* sofa::linearalgebra::BaseMatrix::blocElements ( Index  i,
Index  j,
T buffer 
) const
inline

Shortcut for blocGet(i,j).elements(buffer)

◆ blocGet()

◆ blocGetW()

◆ blocSet()

template<class T >
void sofa::linearalgebra::BaseMatrix::blocSet ( Index  i,
Index  j,
const T buffer 
)
inline

Shortcut for blocCreate(i,j).set(buffer)

◆ bRowBegin()

◆ bRowEnd()

◆ bRowRange()

◆ bRowsBegin()

virtual RowBlockConstIterator sofa::linearalgebra::BaseMatrix::bRowsBegin ( ) const
inlinevirtual

Get the iterator corresponding to the beginning of the rows of blocks.

Reimplemented in sofa::linearalgebra::CompressedRowSparseMatrix< TBlock, TVecBlock, TVecIndex >.

◆ bRowsEnd()

virtual RowBlockConstIterator sofa::linearalgebra::BaseMatrix::bRowsEnd ( ) const
inlinevirtual

Get the iterator corresponding to the end of the rows of blocks.

Reimplemented in sofa::linearalgebra::CompressedRowSparseMatrix< TBlock, TVecBlock, TVecIndex >.

◆ bRowSize()

virtual Index sofa::linearalgebra::BaseMatrix::bRowSize ( ) const
inlinevirtual
Returns
the number of rows of blocks

Reimplemented in sofa::linearalgebra::CompressedRowSparseMatrix< TBlock, TVecBlock, TVecIndex >.

◆ bRowsRange()

virtual std::pair<RowBlockConstIterator, RowBlockConstIterator> sofa::linearalgebra::BaseMatrix::bRowsRange ( ) const
inlinevirtual

Get the iterators corresponding to the beginning and end of the given row of blocks.

Reimplemented in sofa::linearalgebra::CompressedRowSparseMatrix< TBlock, TVecBlock, TVecIndex >.

◆ clear() [1/2]

virtual void sofa::linearalgebra::BaseMatrix::clear ( )
pure virtual

Reset all values to 0.

Implemented in sofa::linearalgebra::CompressedRowSparseMatrix< TBlock, TVecBlock, TVecIndex >, sofa::linearalgebra::CompressedRowSparseMatrix< sofa::type::Mat< NL, NC, MReal > >, sofa::linearalgebra::CompressedRowSparseMatrix< MReal >, sofa::linearalgebra::CompressedRowSparseMatrix< BlockNM >, sofa::linearalgebra::CompressedRowSparseMatrix< BlockMM >, sofa::linearalgebra::CompressedRowSparseMatrix< BlockNN >, sofa::linearalgebra::CompressedRowSparseMatrix< BlockMN >, sofa::linearalgebra::CompressedRowSparseMatrix< Real >, sofa::linearalgebra::EigenBaseSparseMatrix< TReal >, sofa::linearalgebra::EigenBaseSparseMatrix< TOut ::Real >, sofa::linearalgebra::EigenBaseSparseMatrix< OutTypes ::Real >, sofa::linearalgebra::EigenBaseSparseMatrix< OutDataTypes::Real >, sofa::linearalgebra::EigenBaseSparseMatrix< In ::Real >, sofa::linearalgebra::EigenBaseSparseMatrix< typename DataTypes::Real >, sofa::linearalgebra::EigenBaseSparseMatrix< TIn ::Real >, sofa::linearalgebra::EigenBaseSparseMatrix< DataTypes ::Real >, sofa::linearalgebra::EigenBaseSparseMatrix< Out ::Real >, sofa::linearalgebra::EigenBaseSparseMatrix< Real >, sofa::linearalgebra::BTDMatrix< N, T >, sofa::linearalgebra::BlockDiagonalMatrix< LC, T >, sofa::linearalgebra::BlocFullMatrix< N, T >, sofa::linearalgebra::DiagonalMatrix< T >, sofa::linearalgebra::DiagonalMatrix< R1 >, sofa::linearalgebra::DiagonalMatrix< R2 >, sofa::linearalgebra::FullMatrix< T >, sofa::linearalgebra::FullMatrix< double >, sofa::linearalgebra::FullMatrix< typename Vector::Real >, sofa::linearalgebra::FullMatrix< SReal >, sofa::linearalgebra::FullMatrix< Real >, and sofa::linearalgebra::RotationMatrix< TReal >.

◆ clear() [2/2]

◆ clearCol()

◆ clearCols()

virtual void sofa::linearalgebra::BaseMatrix::clearCols ( Index  imin,
Index  imax 
)
inlinevirtual

Clears all the values in columns imin to imax-1.

◆ clearRow()

virtual void sofa::linearalgebra::BaseMatrix::clearRow ( Index  i)
inlinevirtual

Reset all the values in row i to 0.

Reimplemented in sofa::linearalgebra::CompressedRowSparseMatrix< TBlock, TVecBlock, TVecIndex >, sofa::linearalgebra::CompressedRowSparseMatrix< sofa::type::Mat< NL, NC, MReal > >, sofa::linearalgebra::CompressedRowSparseMatrix< MReal >, sofa::linearalgebra::CompressedRowSparseMatrix< BlockNM >, sofa::linearalgebra::CompressedRowSparseMatrix< BlockMM >, sofa::linearalgebra::CompressedRowSparseMatrix< BlockNN >, sofa::linearalgebra::CompressedRowSparseMatrix< BlockMN >, sofa::linearalgebra::CompressedRowSparseMatrix< Real >, sofa::linearalgebra::EigenBaseSparseMatrix< TReal >, sofa::linearalgebra::EigenBaseSparseMatrix< TOut ::Real >, sofa::linearalgebra::EigenBaseSparseMatrix< OutTypes ::Real >, sofa::linearalgebra::EigenBaseSparseMatrix< OutDataTypes::Real >, sofa::linearalgebra::EigenBaseSparseMatrix< In ::Real >, sofa::linearalgebra::EigenBaseSparseMatrix< typename DataTypes::Real >, sofa::linearalgebra::EigenBaseSparseMatrix< TIn ::Real >, sofa::linearalgebra::EigenBaseSparseMatrix< DataTypes ::Real >, sofa::linearalgebra::EigenBaseSparseMatrix< Out ::Real >, sofa::linearalgebra::EigenBaseSparseMatrix< Real >, sofa::linearalgebra::BTDMatrix< N, T >, sofa::linearalgebra::BlockDiagonalMatrix< LC, T >, sofa::linearalgebra::BlocFullMatrix< N, T >, sofa::linearalgebra::DiagonalMatrix< T >, sofa::linearalgebra::DiagonalMatrix< R1 >, sofa::linearalgebra::DiagonalMatrix< R2 >, sofa::linearalgebra::FullMatrix< T >, sofa::linearalgebra::FullMatrix< double >, sofa::linearalgebra::FullMatrix< typename Vector::Real >, sofa::linearalgebra::FullMatrix< SReal >, and sofa::linearalgebra::FullMatrix< Real >.

◆ clearRowCol()

◆ clearRows()

virtual void sofa::linearalgebra::BaseMatrix::clearRows ( Index  imin,
Index  imax 
)
inlinevirtual

Clears the value of rows imin to imax-1.

◆ clearRowsCols()

◆ cols()

Index sofa::linearalgebra::BaseMatrix::cols ( void  ) const
inline

Number of columns (Eigen-compatible API)

◆ colSize()

virtual Index sofa::linearalgebra::BaseMatrix::colSize ( void  ) const
pure virtual

Number of columns.

Implemented in sofa::linearalgebra::EigenBaseSparseMatrix< TReal >, sofa::linearalgebra::EigenBaseSparseMatrix< TOut ::Real >, sofa::linearalgebra::EigenBaseSparseMatrix< OutTypes ::Real >, sofa::linearalgebra::EigenBaseSparseMatrix< OutDataTypes::Real >, sofa::linearalgebra::EigenBaseSparseMatrix< In ::Real >, sofa::linearalgebra::EigenBaseSparseMatrix< typename DataTypes::Real >, sofa::linearalgebra::EigenBaseSparseMatrix< TIn ::Real >, sofa::linearalgebra::EigenBaseSparseMatrix< DataTypes ::Real >, sofa::linearalgebra::EigenBaseSparseMatrix< Out ::Real >, sofa::linearalgebra::EigenBaseSparseMatrix< Real >, sofa::linearalgebra::BTDMatrix< N, T >, sofa::linearalgebra::BlocFullMatrix< N, T >, sofa::linearalgebra::FullMatrix< T >, sofa::linearalgebra::FullMatrix< double >, sofa::linearalgebra::FullMatrix< typename Vector::Real >, sofa::linearalgebra::FullMatrix< SReal >, sofa::linearalgebra::FullMatrix< Real >, sofa::linearalgebra::DiagonalMatrix< T >, sofa::linearalgebra::DiagonalMatrix< R1 >, sofa::linearalgebra::DiagonalMatrix< R2 >, sofa::linearalgebra::BlockDiagonalMatrix< LC, T >, sofa::linearalgebra::RotationMatrix< TReal >, sofa::linearalgebra::CompressedRowSparseMatrix< TBlock, TVecBlock, TVecIndex >, sofa::linearalgebra::CompressedRowSparseMatrix< sofa::type::Mat< NL, NC, MReal > >, sofa::linearalgebra::CompressedRowSparseMatrix< MReal >, sofa::linearalgebra::CompressedRowSparseMatrix< BlockNM >, sofa::linearalgebra::CompressedRowSparseMatrix< BlockMM >, sofa::linearalgebra::CompressedRowSparseMatrix< BlockNN >, sofa::linearalgebra::CompressedRowSparseMatrix< BlockMN >, and sofa::linearalgebra::CompressedRowSparseMatrix< Real >.

◆ compress()

◆ createBlockAccessor() [1/2]

BlockAccessor sofa::linearalgebra::BaseMatrix::createBlockAccessor ( Index  row,
Index  col,
Index  internalData 
)
inlineprotected

◆ createBlockAccessor() [2/2]

BlockAccessor sofa::linearalgebra::BaseMatrix::createBlockAccessor ( Index  row,
Index  col,
void *  internalPtr = nullptr 
)
inlineprotected

◆ createBlockConstAccessor() [1/2]

BlockConstAccessor sofa::linearalgebra::BaseMatrix::createBlockConstAccessor ( Index  row,
Index  col,
Index  internalData 
) const
inlineprotected

◆ createBlockConstAccessor() [2/2]

BlockConstAccessor sofa::linearalgebra::BaseMatrix::createBlockConstAccessor ( Index  row,
Index  col,
void *  internalPtr = nullptr 
) const
inlineprotected

◆ createColBlockConstIterator() [1/2]

ColBlockConstIterator sofa::linearalgebra::BaseMatrix::createColBlockConstIterator ( Index  row,
Index  internalData 
) const
inlineprotected

◆ createColBlockConstIterator() [2/2]

ColBlockConstIterator sofa::linearalgebra::BaseMatrix::createColBlockConstIterator ( Index  row,
void *  internalPtr 
) const
inlineprotected

◆ createRowBlockConstIterator() [1/2]

RowBlockConstIterator sofa::linearalgebra::BaseMatrix::createRowBlockConstIterator ( Index  internalData0,
Index  internalData1 
) const
inlineprotected

◆ createRowBlockConstIterator() [2/2]

RowBlockConstIterator sofa::linearalgebra::BaseMatrix::createRowBlockConstIterator ( void *  internalPtr) const
inlineprotected

◆ element()

virtual SReal sofa::linearalgebra::BaseMatrix::element ( Index  i,
Index  j 
) const
pure virtual

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

Implemented in sofa::linearalgebra::RotationMatrix< TReal >, sofa::linearalgebra::CompressedRowSparseMatrix< TBlock, TVecBlock, TVecIndex >, sofa::linearalgebra::CompressedRowSparseMatrix< sofa::type::Mat< NL, NC, MReal > >, sofa::linearalgebra::CompressedRowSparseMatrix< MReal >, sofa::linearalgebra::CompressedRowSparseMatrix< BlockNM >, sofa::linearalgebra::CompressedRowSparseMatrix< BlockMM >, sofa::linearalgebra::CompressedRowSparseMatrix< BlockNN >, sofa::linearalgebra::CompressedRowSparseMatrix< BlockMN >, sofa::linearalgebra::CompressedRowSparseMatrix< Real >, sofa::linearalgebra::EigenBaseSparseMatrix< TReal >, sofa::linearalgebra::EigenBaseSparseMatrix< TOut ::Real >, sofa::linearalgebra::EigenBaseSparseMatrix< OutTypes ::Real >, sofa::linearalgebra::EigenBaseSparseMatrix< OutDataTypes::Real >, sofa::linearalgebra::EigenBaseSparseMatrix< In ::Real >, sofa::linearalgebra::EigenBaseSparseMatrix< typename DataTypes::Real >, sofa::linearalgebra::EigenBaseSparseMatrix< TIn ::Real >, sofa::linearalgebra::EigenBaseSparseMatrix< DataTypes ::Real >, sofa::linearalgebra::EigenBaseSparseMatrix< Out ::Real >, sofa::linearalgebra::EigenBaseSparseMatrix< Real >, sofa::linearalgebra::BTDMatrix< N, T >, sofa::linearalgebra::BlocFullMatrix< N, T >, sofa::linearalgebra::BlockDiagonalMatrix< LC, T >, sofa::linearalgebra::FullMatrix< T >, sofa::linearalgebra::FullMatrix< double >, sofa::linearalgebra::FullMatrix< typename Vector::Real >, sofa::linearalgebra::FullMatrix< SReal >, sofa::linearalgebra::FullMatrix< Real >, sofa::linearalgebra::DiagonalMatrix< T >, sofa::linearalgebra::DiagonalMatrix< R1 >, and sofa::linearalgebra::DiagonalMatrix< R2 >.

◆ getBandWidth()

virtual Index sofa::linearalgebra::BaseMatrix::getBandWidth ( ) const
inlinevirtual
Returns
the width of the band on each side of the diagonal (only for band matrices)

Reimplemented in sofa::linearalgebra::CompressedRowSparseMatrix< TBlock, TVecBlock, TVecIndex >.

◆ getBlockCols()

virtual Index sofa::linearalgebra::BaseMatrix::getBlockCols ( ) const
inlinevirtual
Returns
the number of columns in each block, or 1 of there are no fixed block size

Reimplemented in sofa::linearalgebra::CompressedRowSparseMatrix< TBlock, TVecBlock, TVecIndex >.

◆ getBlockRows()

virtual Index sofa::linearalgebra::BaseMatrix::getBlockRows ( ) const
inlinevirtual
Returns
the number of rows in each block, or 1 of there are no fixed block size

Reimplemented in sofa::linearalgebra::CompressedRowSparseMatrix< TBlock, TVecBlock, TVecIndex >.

◆ getCategory()

virtual MatrixCategory sofa::linearalgebra::BaseMatrix::getCategory ( ) const
inlinevirtual
Returns
the category of this matrix

Reimplemented in sofa::linearalgebra::CompressedRowSparseMatrix< TBlock, TVecBlock, TVecIndex >.

◆ getElementSize()

virtual std::size_t sofa::linearalgebra::BaseMatrix::getElementSize ( ) const
inlinevirtual
Returns
size of elements stored in this matrix

Reimplemented in sofa::linearalgebra::CompressedRowSparseMatrix< TBlock, TVecBlock, TVecIndex >.

◆ getElementType()

virtual ElementType sofa::linearalgebra::BaseMatrix::getElementType ( ) const
inlinevirtual
Returns
type of elements stored in this matrix

Reimplemented in sofa::linearalgebra::CompressedRowSparseMatrix< TBlock, TVecBlock, TVecIndex >.

◆ getInternal() [1/8]

static InternalBlockAccessor* sofa::linearalgebra::BaseMatrix::getInternal ( BlockAccessor b)
inlinestaticprotected

◆ getInternal() [2/8]

static InternalBlockAccessor* sofa::linearalgebra::BaseMatrix::getInternal ( BlockConstAccessor b)
inlinestaticprotected

◆ getInternal() [3/8]

static InternalColBlockIterator* sofa::linearalgebra::BaseMatrix::getInternal ( ColBlockConstIterator b)
inlinestaticprotected

◆ getInternal() [4/8]

static const InternalBlockAccessor* sofa::linearalgebra::BaseMatrix::getInternal ( const BlockAccessor b)
inlinestaticprotected

◆ getInternal() [5/8]

static const InternalBlockAccessor* sofa::linearalgebra::BaseMatrix::getInternal ( const BlockConstAccessor b)
inlinestaticprotected

◆ getInternal() [6/8]

static const InternalColBlockIterator* sofa::linearalgebra::BaseMatrix::getInternal ( const ColBlockConstIterator b)
inlinestaticprotected

◆ getInternal() [7/8]

static const InternalRowBlockIterator* sofa::linearalgebra::BaseMatrix::getInternal ( const RowBlockConstIterator b)
inlinestaticprotected

◆ getInternal() [8/8]

static InternalRowBlockIterator* sofa::linearalgebra::BaseMatrix::getInternal ( RowBlockConstIterator b)
inlinestaticprotected

◆ isBand()

bool sofa::linearalgebra::BaseMatrix::isBand ( ) const
inline
Returns
true if this matrix is band

◆ isBlockDiagonal()

bool sofa::linearalgebra::BaseMatrix::isBlockDiagonal ( ) const
inline
Returns
true if this matrix is block-diagonal

◆ isDiagonal()

bool sofa::linearalgebra::BaseMatrix::isDiagonal ( ) const
inline
Returns
true if this matrix is diagonal

◆ isSparse()

bool sofa::linearalgebra::BaseMatrix::isSparse ( ) const
inline
Returns
true if this matrix is sparse

◆ itAccessColBlock()

◆ itAccessRowBlock()

◆ itBeginRowBlock()

◆ itCopyColBlock()

◆ itCopyRowBlock()

◆ itDecColBlock()

◆ itDecRowBlock()

◆ itDeleteColBlock()

◆ itDeleteRowBlock()

◆ itEndRowBlock()

◆ itEqColBlock()

◆ itEqRowBlock()

◆ itIncColBlock()

◆ itIncRowBlock()

◆ itLessColBlock()

◆ itLessRowBlock()

◆ itRangeRowBlock()

◆ opAddM()

void sofa::linearalgebra::BaseMatrix::opAddM ( linearalgebra::BaseMatrix m,
double  fact 
) const
virtual

Subtract the matrix to the m matrix and strore the result in m.

Multiply the matrix by vector v and put the result in vector result.

◆ opAddMT()

void sofa::linearalgebra::BaseMatrix::opAddMT ( linearalgebra::BaseMatrix m,
double  fact 
) const
virtual

Subtract the transposed matrix to the m matrix and strore the result in m.

Multiply the matrix by vector v and put the result in vector result.

◆ operator()()

SReal sofa::linearalgebra::BaseMatrix::operator() ( Index  i,
Index  j 
) const
inline

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

◆ opMulTM()

void sofa::linearalgebra::BaseMatrix::opMulTM ( BaseMatrix result,
BaseMatrix m 
) const
virtual

Multiply the transposed matrix by matrix m and store the result in matrix result.

Reimplemented in sofa::linearalgebra::RotationMatrix< TReal >.

◆ opMulTV() [1/3]

void sofa::linearalgebra::BaseMatrix::opMulTV ( double result,
const double v 
) const
virtual

Multiply the transposed matrix by double vector v and put the result in vector result.

◆ opMulTV() [2/3]

void sofa::linearalgebra::BaseMatrix::opMulTV ( float result,
const float v 
) const
virtual

Multiply the transposed matrix by float vector v and put the result in vector result.

◆ opMulTV() [3/3]

void sofa::linearalgebra::BaseMatrix::opMulTV ( linearalgebra::BaseVector result,
const linearalgebra::BaseVector v 
) const
virtual

Multiply the transposed matrix by vector v and put the result in vector result.

Reimplemented in sofa::linearalgebra::RotationMatrix< TReal >.

◆ opMulV() [1/3]

void sofa::linearalgebra::BaseMatrix::opMulV ( double result,
const double v 
) const
virtual

Multiply the matrix by double vector v and put the result in vector result.

◆ opMulV() [2/3]

void sofa::linearalgebra::BaseMatrix::opMulV ( float result,
const float v 
) const
virtual

Multiply the matrix by float vector v and put the result in vector result.

◆ opMulV() [3/3]

void sofa::linearalgebra::BaseMatrix::opMulV ( linearalgebra::BaseVector result,
const linearalgebra::BaseVector v 
) const
virtual

Multiply the matrix by vector v and put the result in vector result.

Reimplemented in sofa::linearalgebra::RotationMatrix< TReal >.

◆ opPMulTV() [1/3]

void sofa::linearalgebra::BaseMatrix::opPMulTV ( double result,
const double v 
) const
virtual

Multiply the transposed matrix by double vector v and add the result in vector result.

◆ opPMulTV() [2/3]

void sofa::linearalgebra::BaseMatrix::opPMulTV ( float result,
const float v 
) const
virtual

Multiply the transposed matrix by float vector v and add the result in vector result.

◆ opPMulTV() [3/3]

void sofa::linearalgebra::BaseMatrix::opPMulTV ( linearalgebra::BaseVector result,
const linearalgebra::BaseVector v 
) const
virtual

Multiply the transposed matrix by vector v and add the result in vector result.

◆ opPMulV() [1/3]

void sofa::linearalgebra::BaseMatrix::opPMulV ( double result,
const double v 
) const
virtual

Multiply the matrix by double vector v and add the result in vector result.

◆ opPMulV() [2/3]

void sofa::linearalgebra::BaseMatrix::opPMulV ( float result,
const float v 
) const
virtual

Multiply the matrix by float vector v and add the result in vector result.

◆ opPMulV() [3/3]

void sofa::linearalgebra::BaseMatrix::opPMulV ( linearalgebra::BaseVector result,
const linearalgebra::BaseVector v 
) const
virtual

Multiply the matrix by vector v and add the result in vector result.

◆ resize()

virtual void sofa::linearalgebra::BaseMatrix::resize ( Index  nbRow,
Index  nbCol 
)
pure virtual

Resize the matrix and reset all values to 0.

Implemented in sofa::linearalgebra::RotationMatrix< TReal >, sofa::linearalgebra::DiagonalMatrix< T >, sofa::linearalgebra::DiagonalMatrix< R1 >, sofa::linearalgebra::DiagonalMatrix< R2 >, sofa::linearalgebra::BlockDiagonalMatrix< LC, T >, sofa::linearalgebra::CompressedRowSparseMatrix< TBlock, TVecBlock, TVecIndex >, sofa::linearalgebra::CompressedRowSparseMatrix< sofa::type::Mat< NL, NC, MReal > >, sofa::linearalgebra::CompressedRowSparseMatrix< MReal >, sofa::linearalgebra::CompressedRowSparseMatrix< BlockNM >, sofa::linearalgebra::CompressedRowSparseMatrix< BlockMM >, sofa::linearalgebra::CompressedRowSparseMatrix< BlockNN >, sofa::linearalgebra::CompressedRowSparseMatrix< BlockMN >, sofa::linearalgebra::CompressedRowSparseMatrix< Real >, sofa::linearalgebra::EigenBaseSparseMatrix< TReal >, sofa::linearalgebra::EigenBaseSparseMatrix< TOut ::Real >, sofa::linearalgebra::EigenBaseSparseMatrix< OutTypes ::Real >, sofa::linearalgebra::EigenBaseSparseMatrix< OutDataTypes::Real >, sofa::linearalgebra::EigenBaseSparseMatrix< In ::Real >, sofa::linearalgebra::EigenBaseSparseMatrix< typename DataTypes::Real >, sofa::linearalgebra::EigenBaseSparseMatrix< TIn ::Real >, sofa::linearalgebra::EigenBaseSparseMatrix< DataTypes ::Real >, sofa::linearalgebra::EigenBaseSparseMatrix< Out ::Real >, sofa::linearalgebra::EigenBaseSparseMatrix< Real >, sofa::linearalgebra::BTDMatrix< N, T >, sofa::linearalgebra::LPtrFullMatrix< T >, sofa::linearalgebra::LPtrFullMatrix< double >, sofa::linearalgebra::LPtrFullMatrix< SReal >, sofa::linearalgebra::BlocFullMatrix< N, T >, sofa::linearalgebra::FullMatrix< T >, sofa::linearalgebra::FullMatrix< double >, sofa::linearalgebra::FullMatrix< typename Vector::Real >, sofa::linearalgebra::FullMatrix< SReal >, and sofa::linearalgebra::FullMatrix< Real >.

◆ rows()

Index sofa::linearalgebra::BaseMatrix::rows ( void  ) const
inline

Number of rows (Eigen-compatible API)

◆ rowSize()

◆ set()

◆ setMatrix() [1/2]

void sofa::linearalgebra::BaseMatrix::setMatrix ( BlockAccessor b)
inlineprotected

◆ setMatrix() [2/2]

void sofa::linearalgebra::BaseMatrix::setMatrix ( BlockConstAccessor b) const
inlineprotected

Enum details

◆ ElementType

Enumerator
ELEMENT_UNKNOWN 
ELEMENT_FLOAT 
ELEMENT_INT 

◆ MatrixCategory

Enumerator
MATRIX_UNKNOWN 
MATRIX_IDENTITY 
MATRIX_DIAGONAL 
MATRIX_BAND 
MATRIX_SPARSE 
MATRIX_FULL 

Related details

◆ operator<<

SOFA_LINEARALGEBRA_API std::ostream& operator<< ( std::ostream &  out,
const sofa::linearalgebra::BaseMatrix m 
)
friend

Declare that the operator << is friend so they can use private data.

◆ operator>>

SOFA_LINEARALGEBRA_API std::istream& operator>> ( std::istream &  in,
sofa::linearalgebra::BaseMatrix m 
)
friend

Declare that the operator >> is friend so they can use private data.