ERC CISST - cisst software
vctUnaryOperations< _outputElementType, _inputElementType > Class Template Reference
#include <vctUnaryOperations.h>
List of all members.
Detailed Description
template<class _outputElementType, class _inputElementType = _outputElementType>
class vctUnaryOperations< _outputElementType, _inputElementType >
Define unary operations on an object as classes.
Class vctUnaryOperations is an envelope that wraps unary operations on an object as classes. vctUnaryOperations defines internal classes such as Identity, AbsValue, 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 InputType & input)
Where OutputType, InputType, are the types of the result and the operand.
By abstracting very simple operations as inline functions, we can plug the vctUnaryOperations 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:
-
| inputElementType | the type of the first (left-side) operand |
| outputElementType | the type of the result |
- See also:
- Identity AbsValue Square Negation
Definition at line 58 of file vctUnaryOperations.h.
Public Types
Classes
- class AbsValue
- Returns the absolute value of the input as an OutputType object. More...
- class Ceil
- Returns the ceiling of the input, that is, the smallest integer greater-than or equal to the input, as an OutputType object. More...
- class Floor
- Returns the floor of the input, that is, the largest integer less-than or equal to the input, as an OutputType object. More...
- class Identity
- Returns the input as an OutputType object. More...
- class IsNegative
- class IsNonNegative
- class IsNonPositive
- class IsNonzero
- class IsPositive
- class Negation
- Returns the negative of the input as an OutputType object. More...
- class Square
- Returns the square of the input as an OutputType object. More...
The documentation for this class was generated from the following file:
erc-cisst-devel<at>lists.johnshopkins.edu