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 <SurgSim/Math/SparseMatrix.h>

Public Types

typedef SparseType::Scalar T
 
typedef SparseType::Index Index
 

Public Member Functions

void assign (T *ptr, size_t start, size_t n, Index m, const DerivedSub &subMatrix, size_t 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, size_t start, size_t n, size_t m, const DerivedSub &subMatrix, size_t 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 Typedef Documentation

◆ Index

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

◆ T

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

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,
const T value 
)
inline

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

Parameters
ptrThe matrix element to be increased
valueThe value to add

◆ 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,
size_t  start,
size_t  n,
size_t  m,
const DerivedSub &  subMatrix,
size_t  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

◆ 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,
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

◆ 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,
size_t  start,
size_t  n,
Index  m,
const DerivedSub &  subMatrix,
size_t  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

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