cisst-saw
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Public Types | List of all members
vctUnaryOperations< _outputElementType, _inputElementType > Class Template Reference

Define unary operations on an object as classes. More...

#include <vctUnaryOperations.h>

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  IsFinite
 
class  IsNaN
 
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...
 

Public Types

typedef _outputElementType OutputElementType
 
typedef _inputElementType InputElementType
 

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
inputElementTypethe type of the first (left-side) operand
outputElementTypethe type of the result
See Also
Identity AbsValue Square Negation

Member Typedef Documentation

template<class _outputElementType , class _inputElementType = _outputElementType>
typedef _inputElementType vctUnaryOperations< _outputElementType, _inputElementType >::InputElementType
template<class _outputElementType , class _inputElementType = _outputElementType>
typedef _outputElementType vctUnaryOperations< _outputElementType, _inputElementType >::OutputElementType

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