ERC CISST - cisst software

vctBinaryOperations< _outputType, _input1Type, _input2Type > Class Template Reference

#include <vctBinaryOperations.h>

List of all members.


Detailed Description

template<class _outputType, class _input1Type = _outputType, class _input2Type = _outputType>
class vctBinaryOperations< _outputType, _input1Type, _input2Type >

Define binary operations between objects as classes.

Class vctBinaryOperations is an envelope that wraps binary operations between objects as classes. BinaryOperations defines internal classes such as Addition, Subtraction, etc., and each of the internal classes has one static function named Operate(), which wraps the corresponding operation. The signature of a typical Operate() is

  static inline OutputType Operate(const Input1Type & input1, const Input2Type & input2)
  

Where OutputType, Input1Type, Input2Type are the types of the result and the two operands.

By abstracting very simple operations as inline functions, we can plug the BinaryOperations internal classes into templated vector operation engines. See an example of such engine in vctFixedSizeVectorRecursiveEngines.h , and an example of plugging an operation into the engine in vctFixedSizeVectorOperations.h .

Parameters:
outputType the type of the result
input1Type the type of the first (left-side) operand
input2Type the type of the second (right-side) operand)
See also:
Addition Subtraction Multiplication Division FirstOperand SecondOperand Maximum Minimum

Definition at line 63 of file vctBinaryOperations.h.

Public Types

Classes


The documentation for this class was generated from the following file:
erc-cisst-devel<at>lists.johnshopkins.edu