cisst-saw
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes
vctFixedSizeVectorRecursiveEngines< _size > Class Template Reference

Container class for the recursive engines. More...

#include <vctFixedSizeVectorRecursiveEngines.h>

Classes

class  Find
 
class  MinAndMax
 
class  SelectByIndex
 
class  SoVi
 Implement operation of the form $s_o = op_{incr}(op(v_i))$ for fixed size vectors. More...
 
class  SoViSi
 Implement operation of the form $s_o = op_{incr}(op(v_i, s_i))$ for fixed size vectors. More...
 
class  SoViVi
 Implement operation of the form $s_o = op_{incr}(op(v_{i1}, v_{i2}))$ for fixed size vectors. More...
 
class  SoVoSi
 Implement operation of the form $s_o = op_{incr}(op(v_o, s_i)$ for fixed size vectors. More...
 
class  Vio
 Implement operation of the form $v_{io} = op(v_{io})$ for fixed size vectors. More...
 
class  VioSi
 Implement operation of the form $ v_{io} = op(v_{io}, s_i)$ for fixed size vectors. More...
 
class  VioSiVi
 Implement operation of the form $v_{io} = op_{io}(v_{io}, op_{sv}(s, v_i))$ for fixed size vectors. More...
 
class  VioVi
 Implement operation of the form $v_{io} = op(v_{io}, v_i)$ for fixed size vectors. More...
 
class  VioVio
 Implement operation of the form $(v_{1}, v_{2}) = op(v_{1}, v_{2})$ for fixed size vectors. More...
 
class  VioViVi
 Implement operation of the form $v_{io} = op_{io}(v_{io}, op_{vv}(v_{i1}, v_{i2}))$ for fixed size vectors. More...
 
class  VoSiVi
 Implement operation of the form $v_o = op(s_i, v_i)$ for fixed size vectors. More...
 
class  VoVi
 Implement operation of the form $v_o = op(v_i)$ for fixed size vectors. More...
 
class  VoViSi
 Implement operation of the form $vo = op(vi, si)$ for fixed size vectors. More...
 
class  VoViVi
 Implement operation of the form $v_o = op(v_{i1}, v_{i2})$ for fixed size vectors. More...
 

Detailed Description

template<vct::size_type _size>
class vctFixedSizeVectorRecursiveEngines< _size >

Container class for the recursive engines.

Recursive engines can be used for fixed size vectors (see vctFixedSizeVector) to apply similar operations (see vctBinaryOperations, vctUnaryOperations, vctStoreBackBinaryOperations, vctStoreBackUnaryOperations). Each engine corresponds to an operation signature.

Recursive engines are named according to the type of the parameters and their role (i.e. input/output). The order reflects the mathematical expression. For exemple, VoViVi stands for one output vector with two input vectors used in $v_o = v_i op v_i$ and VioSi stands for one input/output vector and one scalar input used in $v_{io} = v_{io} op s_i$.

The implementation is based on recursive templates which means that the recursion is not translated into recursive calls in an executable but the compilers "unfold" the code during the compilation. The templated format used here was somewhat imposed by the different compilers supported in cisst. Mainly, Visual C++ 6 doesn't support partial specialization. Therefore, the size parameter has to be sub-templated. It seems that the ANSI C++ forbids the specialization of a sub-templated class (inner template) if the outer template is not specialized. Therefore, the size parameter must be used to template the outer class, i.e. vctFixedSizeVectorRecursiveEngines. The inner class are templated by the operation type and allows to plug any operation with a given signature.

The operation is implemented inline using ``template metaprogramming'' in a recursive form. The order of evaluation is from index 0 to index n-1. The operation has to be declared as a static function, which means it cannot use a third object to contain additional data, and it has to be defined in compilation time.

All vector types must support operator[](unsigned int) to access their elements. The input vector types must have it as const method. The output vector type must have it as non-const method.

Parameters
sizethe size of the vector (determined at compilation time).
See Also
VoViVi VioVi VoViSi VoSiVi VioSi VoVi Vio SoVi SoViVi SoVoSi

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