|
cisst-saw
|
Implement operation of the form \(v_{io} = op_{io}(v_{io}, op_{sv}(s, v_i))\) for fixed size vectors. More...
#include <vctFixedSizeVectorRecursiveEngines.h>
Public Types | |
| typedef vctFixedSizeVectorRecursiveEngines< _size-1 >::template VioSiVi< _ioElementOperationType, _scalarVectorElementOperationType > | RecursiveStep |
Static Public Member Functions | |
| template<class _ioVectorType, class _inputScalarType, class _inputVectorType> | |
| static void | Unfold (_ioVectorType &ioVector, const _inputScalarType &inputScalar, const _inputVectorType &inputVector) |
Implement operation of the form \(v_{io} = op_{io}(v_{io}, op_{sv}(s, v_i))\) for fixed size vectors.
This class uses template specialization to perform store-back vector-scalar-vector operations
\[v_{io} = \mathrm{op_{io}}(V_{io}, \mathrm{op_{sv}}(s, v_i)) \]
where \(v_{io}\) is an input-output (store-back) vector; \(s\) is a scalar; and \(v_i\) is an input vector. A typical example is: \(v_{io} += s \cdot v_i\). The vectors have a fixed size, determined at compilation time; \(op_{sv}\) is an operation between \(s\) and the elements of \(v_i\); \(op_{io}\) is an operation between the output of \(op_{sv}\) and the elements of \(v_{io}\).
| _ioOperationType | The type of the store-back operation. |
| _scalarVectorElementOperationType | The type of the operation between scalar and input vector. |
| typedef vctFixedSizeVectorRecursiveEngines<_size-1>::template VioSiVi<_ioElementOperationType, _scalarVectorElementOperationType> VioSiVi< _ioElementOperationType, _scalarVectorElementOperationType >::RecursiveStep |
|
inlinestatic |
Unfold the recursion. Performs the operation _elementOperationType elementwise on the last elements of the input vector and the input scalar and call Unfold for the _size - 1 elements left (i.e. unfold the recursive calls). The incremental operation is applied to the result of the recursive Unfold call and the result of _elementOperationType(inputVector[_size], inputScalar[_size]).
| inputVector | The input vector (first operand for _elementOperationType). |
| inputScalar | The input scalar (second operand for _elementOperationType). |