|
cisst-saw
|
Implement operation of the form \(v_{io} = op_{io}(v_{io}, op_{vv}(v_{i1}, v_{i2}))\) for fixed size vectors. More...
#include <vctFixedSizeVectorRecursiveEngines.h>
Public Types | |
| typedef vctFixedSizeVectorRecursiveEngines< _size-1 >::template VioViVi< _ioElementOperationType, _vectorElementOperationType > | RecursiveStep |
Static Public Member Functions | |
| template<class _ioVectorType, class _inputVectorType1, class _inputVectorType2> | |
| static void | Unfold (_ioVectorType &ioVector, const _inputVectorType1 &vector1, const _inputVectorType2 &vector2) |
Implement operation of the form \(v_{io} = op_{io}(v_{io}, op_{vv}(v_{i1}, v_{i2}))\) for fixed size vectors.
This class uses template specialization to perform store-back vector-vector-vector operations
\[v_{io} = \mathrm{op_{io}}(V_{io}, \mathrm{op_{vv}}(v_{i1}, v_{i2})) \]
where \(v_{io}\) is an input-output (store-back) vector; \(v_{i1}\) and \(v_{i2}\) are input vectors. A typical example is: \(v_{io} += v_{i1} \cdot v_{i2}\). The vectors have a fixed size, determined at compilation time; \(op_{vv}\) is an element wise operation between the elements of \(v_{i1}\) and the elements of \(v_{i2}\); \(op_{io}\) is an operation between the output of \(op_{vv}\) and the elements of \(v_{io}\).
| _ioOperationType | The type of the store-back operation. |
| _vectorElementOperationType | The type of the operation between scalar and input vector. |
| typedef vctFixedSizeVectorRecursiveEngines<_size-1>::template VioViVi<_ioElementOperationType, _vectorElementOperationType> VioViVi< _ioElementOperationType, _vectorElementOperationType >::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). |