|
cisst-saw
|
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) |
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\).
| _incrementalOperationType | The type of the incremental operation. |
| typedef _incrementalOperationType::OutputType SoVoSi< _incrementalOperationType >::OutputType |
| typedef vctFixedSizeVectorRecursiveEngines<_size-1>::template SoVoSi<_incrementalOperationType> SoVoSi< _incrementalOperationType >::RecursiveStep |
|
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).
| outputVector | The output vector (first operation of the incremental operation). |
| inputScalar | The input scalar (second operand of the incremental operation). |