cisst-saw
Loading...
Searching...
No Matches
VioVio< _elementOperationType > Class Template Reference

Implement operation of the form \((v_{1}, v_{2}) = op(v_{1}, v_{2})\) for fixed size vectors. More...

#include <vctFixedSizeVectorRecursiveEngines.h>

Public Types

typedef vctFixedSizeVectorRecursiveEngines< _size-1 >::template VioVio< _elementOperationType > RecursiveStep

Static Public Member Functions

template<class _inputOutputVector1Type, class _inputOutputVector2Type>
static void Unfold (_inputOutputVector1Type &inputOutput1, _inputOutputVector2Type &inputOutput2)

Detailed Description

template<class _elementOperationType>
class VioVio< _elementOperationType >

Implement operation of the form \((v_{1}, v_{2}) = op(v_{1}, v_{2})\) for fixed size vectors.

This class uses template specialization to perform binary vector operations of the form

\[(v_{1}, v_{2}) = \mathrm{op}(v_{1}, v_{2}) \]

where both \(v_{1}, v_{2}\) are input and output vectors of an equal fixed size, determined at compilation time. The operation is evaluated elementwise, that is, \((v_{1}[i], v_{2}[i] = \mathrm{op}(v_{1}[i], v_{2}[i])\). The typical operation in this case is swapping the elements of the two vectors.

Parameters
_elementOperationTypeThe type of the binary operation that inputs and rewrites corresponding elements in both vectors.
See also
vctFixedSizeVectorRecursiveEngines

Member Typedef Documentation

◆ RecursiveStep

template<class _elementOperationType>
typedef vctFixedSizeVectorRecursiveEngines<_size-1>::template VioVio<_elementOperationType> VioVio< _elementOperationType >::RecursiveStep

Member Function Documentation

◆ Unfold()

template<class _elementOperationType>
template<class _inputOutputVector1Type, class _inputOutputVector2Type>
void VioVio< _elementOperationType >::Unfold ( _inputOutputVector1Type & inputOutput1,
_inputOutputVector2Type & inputOutput2 )
inlinestatic

Unfold the recursion. Performs the operation _elementOperationType elementwise on the last elements of the input/output vector(s) and call Unfold for the _size - 1 elements left (i.e. unfold the recursive calls).

Parameters
inputOutput1The first input-output vector.
inputOutput2The second input-output vector.

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