cisst-saw
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Static Public Member Functions | List of all members
vctDynamicMatrixLoopEngines::MoMiMi< _elementOperationType > Class Template Reference

#include <vctDynamicMatrixLoopEngines.h>

Static Public Member Functions

template<class _outputMatrixType , class _input1MatrixType , class _input2MatrixType >
static void Run (_outputMatrixType &outputMatrix, const _input1MatrixType &input1Matrix, const _input2MatrixType &input2Matrix)
 

Detailed Description

template<class _elementOperationType>
class vctDynamicMatrixLoopEngines::MoMiMi< _elementOperationType >

Perform elementwise operation between matrices of identical size and element type. The operation semantics is

output[row][column] = op(input1[row][column], input2[row][column]);

This is a similar semantics to the vctFixedSizeVectorRecursiveEngines::VoViVi engine. However, for matrice we implement the operation using a loop instead of recursion.

The engine is declared as a protected class. This enables us to use softer declaration of the template arguments, as opposed to the functions calling this engine, which have to declare their arguments as matrices templated over stride etc.

To use the engine, assume that Mout, Mi1, and Mi2 are matrix types; that mout, mi1, and mi2 are objects of corresponding types; and that OP is a valid operation in the form

\[ value\_type \times value\_type \rightarrow value\_type \]

Then write

MoMiMi<OP>::Run(mout, mi1, mi2);
Parameters
_elementOperationTypea binary operation class. _elementOperationType must have a static method with the signature
_elementOperationType::Operate(_elementType, _elementType)

Member Function Documentation

template<class _elementOperationType >
template<class _outputMatrixType , class _input1MatrixType , class _input2MatrixType >
static void vctDynamicMatrixLoopEngines::MoMiMi< _elementOperationType >::Run ( _outputMatrixType &  outputMatrix,
const _input1MatrixType &  input1Matrix,
const _input2MatrixType &  input2Matrix 
)
inlinestatic

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