cisst-saw
Loading...
Searching...
No Matches
SoVoSi< _incrementalOperationType > Class Template Reference

Implement operation of the form \(s_o = op_{incr}(op(v_o, s_i)\) for fixed size vectors. More...

#include <vctFixedSizeVectorRecursiveEngines.h>

Public Types

typedef vctFixedSizeVectorRecursiveEngines< _size-1 >::template SoVoSi< _incrementalOperationType > RecursiveStep
typedef _incrementalOperationType::OutputType OutputType

Static Public Member Functions

template<class _outputVectorType, class _inputScalarType>
static OutputType Unfold (_outputVectorType &outputVector, const _inputScalarType &inputScalar)

Detailed Description

template<class _incrementalOperationType>
class SoVoSi< _incrementalOperationType >

Implement operation of the form \(s_o = op_{incr}(op(v_o, s_i)\) for fixed size vectors.

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

\[s_o = \mathrm{op_{incr}(v_{o}, s_i)} \]

where \(v_{o}\) is the output vector and \(s_o\) and \(s_i\) are the scalar output and input. The vector has a fixed size, determined at compilation time. \(op_{incr}\) is the incremental operation using \(v_{o}[i]\) and \(s_i\). For a vector of size 3, the result is \(s_o = op_{incr}(op_{incr}(v_o[2], op_{incr}(v_o[1], op_{incr}(v_o[0], s_i))))\).

This engines is currently used by vctFixedSizeVector::SetAll with vctBinaryOperations::SecondOperand. For a vector of size 3, the result is: \(s_o = v_o[2] = v_o[1] = v_o[0] = s_i\).

Parameters
_incrementalOperationTypeThe type of the incremental operation.
See also
vctFixedSizeVectorRecursiveEngines

Member Typedef Documentation

◆ OutputType

template<class _incrementalOperationType>
typedef _incrementalOperationType::OutputType SoVoSi< _incrementalOperationType >::OutputType

◆ RecursiveStep

template<class _incrementalOperationType>
typedef vctFixedSizeVectorRecursiveEngines<_size-1>::template SoVoSi<_incrementalOperationType> SoVoSi< _incrementalOperationType >::RecursiveStep

Member Function Documentation

◆ Unfold()

template<class _incrementalOperationType>
template<class _outputVectorType, class _inputScalarType>
OutputType SoVoSi< _incrementalOperationType >::Unfold ( _outputVectorType & outputVector,
const _inputScalarType & inputScalar )
inlinestatic

Unfold the recursion. The incremental operation is applied to the result of the recursive Unfold call and the result of _incrementalOperationType(outputVector[_size], inputScalar).

Parameters
outputVectorThe output vector (first operation of the incremental operation).
inputScalarThe input scalar (second operand of the incremental operation).

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