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

  DerivedSub | The class of the matrix from which the data are copied
  SparseType | The type of the SparseVector/SparseMatrix containing the chunk of memory
  StorageOrder | The 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,
|  | 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

  ptr | The chunk of memory
  start | Where the addition starts in the chunk of memory
  n,m | The size of the block (n rows, m columns)
  subMatrix | The matrix from which the row/column is added
  colRowId | The 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

  ptr | The matrix element to be increased
  value | The 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,
|  | 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

  ptr | The chunk of memory
  start | Where the assignment starts in the chunk of memory
  n,m | The size of the block (n rows, m columns)
  subMatrix | The matrix from which the row/column is copied
  colRowId | The 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

  ptr | The matrix element to be assigned
  value | The value to assign to

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

- SurgSim/Math/SparseMatrix.h