opensurgsim
Public Types | Public Member Functions | List of all members
SurgSim::Math::Operation< DerivedSub, SparseType, StorageOrder > Class Template Reference

Helper class to run operation a column/row of a matrix to a chunk of memory where the size is dynamically defined. More...

#include <SparseMatrix.h>

Public Types

typedef SparseType::Scalar T
 
typedef SparseType::StorageIndex StorageIndex
 

Public Member Functions

void assign (T *ptr, StorageIndex start, Eigen::Index n, Eigen::Index m, const Eigen::Ref< const DerivedSub > &subMatrix, Eigen::Index colRowId)
 Do the assignment of a row/column of a matrix to a chunk of memory. More...
 
void assign (T *ptr, const T &value)
 Do the assignment of a single matrix element (operator =) More...
 
void add (T *ptr, StorageIndex start, Eigen::Index n, Eigen::Index m, const Eigen::Ref< const DerivedSub > &subMatrix, Eigen::Index colRowId)
 Do the addition of a row/column of a matrix to a chunk of memory. More...
 
void add (T *ptr, const T &value)
 Do the addition of a single matrix element (operator +=) More...
 

Detailed Description

template<class DerivedSub, class SparseType, int StorageOrder = ((SparseType::Flags & Eigen::RowMajorBit) == Eigen::RowMajorBit) ? Eigen::RowMajor : Eigen::ColMajor>
class SurgSim::Math::Operation< DerivedSub, SparseType, StorageOrder >

Helper class to run operation a column/row of a matrix to a chunk of memory where the size is dynamically defined.

Template Parameters
DerivedSubThe class of the matrix from which the data are copied
SparseTypeThe type of the SparseVector/SparseMatrix containing the chunk of memory
StorageOrderThe storage option of the SparseType

Member Function Documentation

§ add() [1/2]

template<class DerivedSub, class SparseType, int StorageOrder = ((SparseType::Flags & Eigen::RowMajorBit) == Eigen::RowMajorBit) ? Eigen::RowMajor : Eigen::ColMajor>
void SurgSim::Math::Operation< DerivedSub, SparseType, StorageOrder >::add ( T *  ptr,
StorageIndex  start,
Eigen::Index  n,
Eigen::Index  m,
const Eigen::Ref< const DerivedSub > &  subMatrix,
Eigen::Index  colRowId 
)
inline

Do the addition of a row/column of a matrix to a chunk of memory.

Parameters
ptrThe chunk of memory
startWhere the addition starts in the chunk of memory
n,mThe size of the block (n rows, m columns)
subMatrixThe matrix from which the row/column is added
colRowIdThe column or row id depending on the template parameter Opt

§ add() [2/2]

template<class DerivedSub, class SparseType, int StorageOrder = ((SparseType::Flags & Eigen::RowMajorBit) == Eigen::RowMajorBit) ? Eigen::RowMajor : Eigen::ColMajor>
void SurgSim::Math::Operation< DerivedSub, SparseType, StorageOrder >::add ( T *  ptr,
const T &  value 
)
inline

Do the addition of a single matrix element (operator +=)

Parameters
ptrThe matrix element to be increased
valueThe value to add

§ assign() [1/2]

template<class DerivedSub, class SparseType, int StorageOrder = ((SparseType::Flags & Eigen::RowMajorBit) == Eigen::RowMajorBit) ? Eigen::RowMajor : Eigen::ColMajor>
void SurgSim::Math::Operation< DerivedSub, SparseType, StorageOrder >::assign ( T *  ptr,
StorageIndex  start,
Eigen::Index  n,
Eigen::Index  m,
const Eigen::Ref< const DerivedSub > &  subMatrix,
Eigen::Index  colRowId 
)
inline

Do the assignment of a row/column of a matrix to a chunk of memory.

Parameters
ptrThe chunk of memory
startWhere the assignment starts in the chunk of memory
n,mThe size of the block (n rows, m columns)
subMatrixThe matrix from which the row/column is copied
colRowIdThe column or row id depending on the template parameter Opt

§ assign() [2/2]

template<class DerivedSub, class SparseType, int StorageOrder = ((SparseType::Flags & Eigen::RowMajorBit) == Eigen::RowMajorBit) ? Eigen::RowMajor : Eigen::ColMajor>
void SurgSim::Math::Operation< DerivedSub, SparseType, StorageOrder >::assign ( T *  ptr,
const T &  value 
)
inline

Do the assignment of a single matrix element (operator =)

Parameters
ptrThe matrix element to be assigned
valueThe value to assign to

The documentation for this class was generated from the following file: