SOFA API  b3f2f2a4
Open source framework for multi-physics simuation
sofa::linearalgebra::EigenSparseMatrix< InDataTypes, OutDataTypes > Class Template Reference

#include <EigenSparseMatrix.h>

Inheritance diagram for sofa::linearalgebra::EigenSparseMatrix< InDataTypes, OutDataTypes >:

Detailed Description

template<class InDataTypes, class OutDataTypes>
class sofa::linearalgebra::EigenSparseMatrix< InDataTypes, OutDataTypes >

Variant of EigenBaseSparseMatrix, capable of block-view access. The blocks correspond to matrix blocks of the size of the DataTypes Deriv.

There are two ways of filling the matrix:

  • Random block access is provided by method wBlock. Use compress() after the last insertion.
  • Block rows can be efficiently appended using methods beginBlockRow, createBlock, endBlockRow. Use compress() after the last insertion. The rows must be created in increasing index order.

The two ways of filling the matrix can not be used at the same time.

Classes

struct  map_traits
 

Protected Attributes

BlockMatMap incomingBlocks
 To store block-view data before it is compressed in optimized format. More...
 
- Protected Attributes inherited from sofa::linearalgebra::EigenBaseSparseMatrix< OutDataTypes::Real >
SimplicialCholesky cholesky
 used to factorize the matrix and solve systems using Cholesky method, for symmetric positive definite matrices only. More...
 

Public Member Functions

 EigenSparseMatrix (int nbRow=0, int nbCol=0)
 
void resizeBlocks (int nbBlockRows, int nbBlockCols)
 Resize the matrix without preserving the data (the matrix is set to zero), with the size given in number of blocks. More...
 
void addBlock (unsigned row, unsigned col, const Block &b)
 Schedule the addition of the block at the given place. Scheduled additions must be finalized using function compress(). More...
 
void insertBackBlock (unsigned row, unsigned col, const Block &b)
 
void beginBlockRow (unsigned row)
 
void createBlock (unsigned column, const Block &b)
 
void endBlockRow ()
 
void endSortedBlockRow ()
 
template<class AnyReal >
void copyFrom (const CompressedRowSparseMatrix< type::Mat< Nout, Nin, AnyReal > > &crs)
 
void mult (OutVecDeriv &result, const InVecDeriv &data) const
 compute result = A * data More...
 
void addMult (OutVecDeriv &result, const InVecDeriv &data) const
 compute result += A * data More...
 
void addMult (OutVecDeriv &result, const InVecDeriv &data, const OutReal fact) const
 compute result += A * data * fact More...
 
void addMultTranspose (InVecDeriv &result, const OutVecDeriv &data) const
 compute result += A^T * data More...
 
void addMultTranspose (InVecDeriv &result, const OutVecDeriv &data, const OutReal fact) const
 compute result += A^T * data * fact More...
 
- Public Member Functions inherited from sofa::linearalgebra::EigenBaseSparseMatrix< OutDataTypes::Real >
 EigenBaseSparseMatrix (Index nbRow=0, Index nbCol=0)
 
 EigenBaseSparseMatrix (const ThisMatrix &m)
 copy constructor More...
 
void operator= (const ThisMatrix &m)
 copy operator 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 setIdentity ()
 
void add (Index row, Index col, double value) override
 Schedule the addition of the value at the given place. Scheduled additions must be finalized using function compress(). More...
 
void beginRow (Index index)
 
void insertBack (Index row, Index col, Real value)
 
RealcoeffRef (Index i, Index j)
 Return a reference to the given entry in the compressed matrix.There can (must ?) be a value at this place already. Efficient only if the it is at the last place of the compressed matrix. More...
 
void copy (const EigenBaseSparseMatrix &m, unsigned nbCol, unsigned shift)
 
void resize (Index nbRow, Index nbCol) override
 Resize the matrix without preserving the data (the matrix is set to zero) More...
 
Index rowSize (void) const override
 number of rows More...
 
Index colSize (void) const override
 number of columns More...
 
void reserve (typename CompressedMatrix::Index reserveSize)
 
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 compress () override
 Add the values from the scheduled list, and clears the schedule list. More...
 
IndexgetRowBegin ()
 
IndexgetColsIndex ()
 
RealgetColsValue ()
 
void clearRow (Index i) override
 Set all the entries of a row to 0. More...
 
void clearRows (Index imin, Index imax) override
 Set all the entries of rows imin to imax-1 to 0. More...
 
void clearCol (Index col) override
 Clears the all the entries of column imin to column imax-1. Not efficient ! More...
 
void clearCols (Index imin, Index imax) override
 Set all the entries of column i and of row i to 0. Not efficient ! More...
 
void clearRowCol (Index i) override
 Clears all the entries of rows imin to imax-1 and columns imin to imax-1. More...
 
void clearRowsCols (Index imin, Index imax) override
 Clears all the values in rows imin to imax-1 and columns imin to imax-1. More...
 
void clear () override
 Set all values to 0, by resizing to the same size. More...
 
void mult (VectorEigen &result, const VectorEigen &data)
 Matrix-vector product. More...
 
void mult_MT (VectorEigen &result, const VectorEigen &data)
 Matrix-vector product openmp multithreaded. More...
 
void multVector (V1 &output, const V2 &input)
 Matrix-Vector product (dense vector with contiguous memory layout) More...
 
operator* (const V &input)
 Matrix-Vector product (dense vector with contiguous memory layout) More...
 
const charName ()
 
const charName ()
 
bool choleskyDecompose ()
 Try to compute the LDLT decomposition, and return true if success. The matrix is unchanged. More...
 
void choleskySolve (VectorEigen &x, const VectorEigen &b) const
 Solve Ax=b, where A is this matrix. WARNING: ldltDecompose() must be called first. x and b can be the same vector. More...
 
void addToBaseMatrix (BaseMatrix *matrix, SReal factor, Index offset) const
 add this EigenBaseSparseMatrix to a BaseMatrix at the offset and multiplied by factor More...
 
void mul (EigenBaseSparseMatrix< Real > &res, const EigenBaseSparseMatrix< Real > &rhs) const
 
void mul (Eigen::Matrix< Real, Eigen::Dynamic, Eigen::Dynamic > &res, const Eigen::Matrix< Real, Eigen::Dynamic, Eigen::Dynamic > &rhs)
 Sparse x Dense Matrix product. More...
 
void mul_MT (EigenBaseSparseMatrix< Real > &res, const EigenBaseSparseMatrix< Real > &rhs) const
 
void mul_MT (Eigen::Matrix< Real, Eigen::Dynamic, Eigen::Dynamic > &res, const Eigen::Matrix< Real, Eigen::Dynamic, Eigen::Dynamic > &rhs)
 Sparse x Dense Matrix product openmp multithreaded. 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 clear (Index i, Index j)
 
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 std::string Name ()
 
- Static Public Member Functions inherited from sofa::linearalgebra::EigenBaseSparseMatrix< OutDataTypes::Real >
static const charName ()
 

Protected Member Functions

template<class OutType , class InType >
void mult_impl (OutType &result, const InType &data) const
 
template<class OutType , class InType >
void addMult_impl (OutType &result, const InType &data, Real fact) const
 
template<class InType , class OutType >
void addMultTranspose_impl (InType &result, const OutType &data, Real fact) const
 
- 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
 

Static Protected Member Functions

template<class VecDeriv >
static map_traits< VecDeriv >::const_map_type map (const VecDeriv &data)
 
template<class VecDeriv >
static map_traits< VecDeriv >::map_type map (VecDeriv &data)
 
template<class LHS , class RHS >
static bool alias (const LHS &lhs, const RHS &rhs)
 
- 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)
 

Additional Inherited Members

- Public Attributes inherited from sofa::linearalgebra::EigenBaseSparseMatrix< OutDataTypes::Real >
CompressedMatrix compressedMatrix
 the compressed matrix More...
 

Attribute details

◆ incomingBlocks

template<class InDataTypes , class OutDataTypes >
BlockMatMap sofa::linearalgebra::EigenSparseMatrix< InDataTypes, OutDataTypes >::incomingBlocks
protected

To store block-view data before it is compressed in optimized format.

Constructor details

◆ EigenSparseMatrix()

template<class InDataTypes , class OutDataTypes >
sofa::linearalgebra::EigenSparseMatrix< InDataTypes, OutDataTypes >::EigenSparseMatrix ( int  nbRow = 0,
int  nbCol = 0 
)
inline

Function details

◆ addBlock()

template<class InDataTypes , class OutDataTypes >
void sofa::linearalgebra::EigenSparseMatrix< InDataTypes, OutDataTypes >::addBlock ( unsigned  row,
unsigned  col,
const Block b 
)
inline

Schedule the addition of the block at the given place. Scheduled additions must be finalized using function compress().

◆ addMult() [1/2]

template<class InDataTypes , class OutDataTypes >
void sofa::linearalgebra::EigenSparseMatrix< InDataTypes, OutDataTypes >::addMult ( OutVecDeriv result,
const InVecDeriv data 
) const
inline

compute result += A * data

◆ addMult() [2/2]

template<class InDataTypes , class OutDataTypes >
void sofa::linearalgebra::EigenSparseMatrix< InDataTypes, OutDataTypes >::addMult ( OutVecDeriv result,
const InVecDeriv data,
const OutReal  fact 
) const
inline

compute result += A * data * fact

◆ addMult_impl()

template<class InDataTypes , class OutDataTypes >
template<class OutType , class InType >
void sofa::linearalgebra::EigenSparseMatrix< InDataTypes, OutDataTypes >::addMult_impl ( OutType &  result,
const InType &  data,
Real  fact 
) const
inlineprotected

◆ addMultTranspose() [1/2]

template<class InDataTypes , class OutDataTypes >
void sofa::linearalgebra::EigenSparseMatrix< InDataTypes, OutDataTypes >::addMultTranspose ( InVecDeriv result,
const OutVecDeriv data 
) const
inline

compute result += A^T * data

◆ addMultTranspose() [2/2]

template<class InDataTypes , class OutDataTypes >
void sofa::linearalgebra::EigenSparseMatrix< InDataTypes, OutDataTypes >::addMultTranspose ( InVecDeriv result,
const OutVecDeriv data,
const OutReal  fact 
) const
inline

compute result += A^T * data * fact

◆ addMultTranspose_impl()

template<class InDataTypes , class OutDataTypes >
template<class InType , class OutType >
void sofa::linearalgebra::EigenSparseMatrix< InDataTypes, OutDataTypes >::addMultTranspose_impl ( InType &  result,
const OutType &  data,
Real  fact 
) const
inlineprotected

◆ alias()

template<class InDataTypes , class OutDataTypes >
template<class LHS , class RHS >
static bool sofa::linearalgebra::EigenSparseMatrix< InDataTypes, OutDataTypes >::alias ( const LHS &  lhs,
const RHS &  rhs 
)
inlinestaticprotected

◆ beginBlockRow()

template<class InDataTypes , class OutDataTypes >
void sofa::linearalgebra::EigenSparseMatrix< InDataTypes, OutDataTypes >::beginBlockRow ( unsigned  row)
inline

Prepare the insertion of a new row of blocks in the matrix. Then create blocks using createBlock( unsigned column, const Block& b ). Then finally use endBlockRow() or endSortedBlockRow() to validate the row insertion.

See also
createBlock( unsigned column, const Block& b )
endBlockRow()
Warning
empty rows should be created with a call to beginBlockRow + endSortedBlockRow

◆ copyFrom()

template<class InDataTypes , class OutDataTypes >
template<class AnyReal >
void sofa::linearalgebra::EigenSparseMatrix< InDataTypes, OutDataTypes >::copyFrom ( const CompressedRowSparseMatrix< type::Mat< Nout, Nin, AnyReal > > &  crs)
inline

Set from a CompressedRowSparseMatrix.

Precondition
crs must be compressed

◆ createBlock()

template<class InDataTypes , class OutDataTypes >
void sofa::linearalgebra::EigenSparseMatrix< InDataTypes, OutDataTypes >::createBlock ( unsigned  column,
const Block b 
)
inline

Create a block in the current row, which must be previously initialized using beginBlockRow(unsigned row).

If the blocks are NOT created in column order, call endBlockRow(). If the blocks are given in column order, endSortedBlockRow() will be more efficient.

The blocks are not actually created in the matrix until method endBlockRow()/endSortedBlockRow() is called.

Warning
the block must NOT already exist

◆ endBlockRow()

template<class InDataTypes , class OutDataTypes >
void sofa::linearalgebra::EigenSparseMatrix< InDataTypes, OutDataTypes >::endBlockRow ( )
inline

Finalize the creation of the current block row.

See also
beginBlockRow(unsigned row)
createBlock( unsigned column, const Block& b )

If the block have been given in column order, endSortedBlockRow() is more efficient.

◆ endSortedBlockRow()

template<class InDataTypes , class OutDataTypes >
void sofa::linearalgebra::EigenSparseMatrix< InDataTypes, OutDataTypes >::endSortedBlockRow ( )
inline

Finalize the creation of the current block row with blocks given in colum order.

See also
beginBlockRow(unsigned row)
createBlock( unsigned column, const Block& b ) in column order

◆ insertBackBlock()

template<class InDataTypes , class OutDataTypes >
void sofa::linearalgebra::EigenSparseMatrix< InDataTypes, OutDataTypes >::insertBackBlock ( unsigned  row,
unsigned  col,
const Block b 
)
inline

Insert ASAP in the compressed matrix. There must be no value at this place already.

Warning
basically works only if there is only one block on the row
empty rows should be created with a call to beginBlockRow + endSortedBlockRow

◆ map() [1/2]

template<class InDataTypes , class OutDataTypes >
template<class VecDeriv >
static map_traits<VecDeriv>::const_map_type sofa::linearalgebra::EigenSparseMatrix< InDataTypes, OutDataTypes >::map ( const VecDeriv &  data)
inlinestaticprotected

◆ map() [2/2]

template<class InDataTypes , class OutDataTypes >
template<class VecDeriv >
static map_traits<VecDeriv>::map_type sofa::linearalgebra::EigenSparseMatrix< InDataTypes, OutDataTypes >::map ( VecDeriv &  data)
inlinestaticprotected

◆ mult()

template<class InDataTypes , class OutDataTypes >
void sofa::linearalgebra::EigenSparseMatrix< InDataTypes, OutDataTypes >::mult ( OutVecDeriv result,
const InVecDeriv data 
) const
inline

compute result = A * data

◆ mult_impl()

template<class InDataTypes , class OutDataTypes >
template<class OutType , class InType >
void sofa::linearalgebra::EigenSparseMatrix< InDataTypes, OutDataTypes >::mult_impl ( OutType &  result,
const InType &  data 
) const
inlineprotected

◆ Name()

template<class InDataTypes , class OutDataTypes >
static const std::string sofa::linearalgebra::EigenSparseMatrix< InDataTypes, OutDataTypes >::Name ( )
inlinestatic

◆ resizeBlocks()

template<class InDataTypes , class OutDataTypes >
void sofa::linearalgebra::EigenSparseMatrix< InDataTypes, OutDataTypes >::resizeBlocks ( int  nbBlockRows,
int  nbBlockCols 
)
inline

Resize the matrix without preserving the data (the matrix is set to zero), with the size given in number of blocks.

Enum details

◆ anonymous enum

template<class InDataTypes , class OutDataTypes >
anonymous enum
Enumerator
Nin 
Nout