cisst-saw
|
Container class for the recursive engines. More...
#include <vctFixedSizeVectorRecursiveEngines.h>
Classes | |
class | Find |
class | MinAndMax |
class | SelectByIndex |
class | SoVi |
Implement operation of the form ![]() | |
class | SoViSi |
Implement operation of the form ![]() | |
class | SoViVi |
Implement operation of the form ![]() | |
class | SoVoSi |
Implement operation of the form ![]() | |
class | Vio |
Implement operation of the form ![]() | |
class | VioSi |
Implement operation of the form ![]() | |
class | VioSiVi |
Implement operation of the form ![]() | |
class | VioVi |
Implement operation of the form ![]() | |
class | VioVio |
Implement operation of the form ![]() | |
class | VioViVi |
Implement operation of the form ![]() | |
class | VoSiVi |
Implement operation of the form ![]() | |
class | VoVi |
Implement operation of the form ![]() | |
class | VoViSi |
Implement operation of the form ![]() | |
class | VoViVi |
Implement operation of the form ![]() | |
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 and VioSi stands for one input/output vector and one scalar input used in
.
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.
size | the size of the vector (determined at compilation time). |