nemo::MappingDefinition< InType, OutType > Class Template Reference
A MappingDefinition defines the behavior of a function object. More...
#include <Mapping.h>
Public Member Functions | |
virtual OutType | evaluate (InType value) const =0 |
Compute the outut value for a given input value. | |
virtual MappingDefinition < OutType, InType > * | getInverse () const |
Creates an inverse function if applicable. | |
virtual | ~MappingDefinition () |
Detailed Description
template<class InType, class OutType>
class nemo::MappingDefinition< InType, OutType >
A MappingDefinition defines the behavior of a function object.
The input-output behavior is defined in the evaluate() method that receives an object of type InType and returns an object of type OutType. Implement this function to create a custom mapping.
A mapping does not necessarily need to a mathematical function. It can have an internal state that influences the input-output behavior.
This class can be used in isolation, just as it is, but is not meant to. Rather, assign a MappingDefinition to a Mapping Object and get some nice syntactic sugar and automatic memory management.
- See also:
- Mapping
Definition at line 39 of file Mapping.h.
Constructor & Destructor Documentation
virtual nemo::MappingDefinition< InType, OutType >::~MappingDefinition | ( | ) | [inline, virtual] |
Member Function Documentation
virtual OutType nemo::MappingDefinition< InType, OutType >::evaluate | ( | InType | value | ) | const [pure virtual] |
Compute the outut value for a given input value.
Implemented in nemo::FirstOrderFilter< ValueType, NormType >, nemo::SecondOrderFilter< ValueType, NormType >, nemo::SubspaceMapping< T >, nemo::PolynomExpansion< T >, nemo::Clamping< T >, nemo::Spherical2Cartesian< T >, and nemo::Cartesian2Spherical< T >.
virtual MappingDefinition<OutType,InType>* nemo::MappingDefinition< InType, OutType >::getInverse | ( | ) | const [inline, virtual] |
Creates an inverse function if applicable.
This functionality is optional! If the MappingDefinition implements a mathematical function that is invertible, it should implement this method, but does not have to. For non-bijective functions it is sound to return a generalized (left or right) inverse function. For a function f this means that it must return a function g such that f(g(f(x))) = f(x) and g(f(g(x))) = g(x). If the Mapping is not invertible in this sense, it MUST throw an exception when getInverse() is called.
Reimplemented in nemo::Spherical2Cartesian< T >, and nemo::Cartesian2Spherical< T >.
The documentation for this class was generated from the following file:
- nemo/Mapping.h
Generated on Mon Feb 25 12:49:59 2013 for NemoMath by 1.6.3