nemo::Mapping< InType, OutType > Class Template Reference

A Mapping represents an input-output behavior (for instance a mathematical function) that is defined be a MappingDefinition. More...

#include <Mapping.h>

List of all members.

Public Member Functions

 Mapping (MappingDefinition< InType, OutType > *defP)
 Create a mapping from a mapping definition.
 Mapping ()
 Create a mapping With constant value OutType().
 Mapping (const OutType &value)
 Create a mapping With constant value.
 Mapping (OutType(*const func)(InType), InType(*const invFunc)(OutType)=NULL)
 Creates a mapping that evaluates the function that is passed as first argument by a function pointer.
template<typename F , typename BoostArgDescription >
 Mapping (boost::_bi::bind_t< OutType, F, BoostArgDescription > func)
 Creates a mapping form a boost::bind expression.
OutType operator() (InType value) const
 Evaluate the outcome of the mapping for a given input value.
template<typename OtherInType >
Mapping< OtherInType, OutType > operator() (Mapping< OtherInType, InType > m)
 Chain two mappings.
IntrusivePtr
< MappingDefinition< InType,
OutType > > 
getDefinition () const
 Return the definition object belonging to this Mapping.
Mapping< OutType, InType > inverse ()

Friends

class Mapping

Detailed Description

template<class InType, class OutType>
class nemo::Mapping< InType, OutType >

A Mapping represents an input-output behavior (for instance a mathematical function) that is defined be a MappingDefinition.

The Mapping object adds a lot of convenience to the MappingDefinition object. It acts as a "smart pointer" on the MappingDefinition and adds intuitive operator support. A mapping can be evaluated with the round-bracket operator() which corresponds to evaluate() of the mapping definition. Also, you can use mathematical operators like + on mappings (see ExampleMappingArithmetics.cpp).

Definition at line 161 of file Mapping.h.


Constructor & Destructor Documentation

template<class InType, class OutType>
nemo::Mapping< InType, OutType >::Mapping ( MappingDefinition< InType, OutType > *  defP  )  [inline]

Create a mapping from a mapping definition.

The MappingDefinition object is afterwards owned by the Mapping

Definition at line 166 of file Mapping.h.

template<class InType, class OutType>
nemo::Mapping< InType, OutType >::Mapping (  )  [inline]

Create a mapping With constant value OutType().

Definition at line 177 of file Mapping.h.

template<class InType, class OutType>
nemo::Mapping< InType, OutType >::Mapping ( const OutType &  value  )  [inline]

Create a mapping With constant value.

Definition at line 184 of file Mapping.h.

template<class InType, class OutType>
nemo::Mapping< InType, OutType >::Mapping ( OutType(*)(InType)  func,
InType(*)(OutType)  invFunc = NULL 
) [inline]

Creates a mapping that evaluates the function that is passed as first argument by a function pointer.

The second argument is optional an can be used to specify the corresponding inverse function.

Definition at line 192 of file Mapping.h.

template<class InType, class OutType>
template<typename F , typename BoostArgDescription >
nemo::Mapping< InType, OutType >::Mapping ( boost::_bi::bind_t< OutType, F, BoostArgDescription >  func  )  [inline]

Creates a mapping form a boost::bind expression.

Definition at line 204 of file Mapping.h.


Member Function Documentation

template<class InType, class OutType>
IntrusivePtr<MappingDefinition<InType,OutType> > nemo::Mapping< InType, OutType >::getDefinition (  )  const [inline]

Return the definition object belonging to this Mapping.

Definition at line 227 of file Mapping.h.

template<class InType, class OutType>
Mapping<OutType,InType> nemo::Mapping< InType, OutType >::inverse (  )  [inline]

Definition at line 231 of file Mapping.h.

template<class InType, class OutType>
template<typename OtherInType >
Mapping<OtherInType,OutType> nemo::Mapping< InType, OutType >::operator() ( Mapping< OtherInType, InType >  m  )  [inline]

Chain two mappings.

h = f(g) means that h(x)=f(g(x)).

Definition at line 219 of file Mapping.h.

template<class InType, class OutType>
OutType nemo::Mapping< InType, OutType >::operator() ( InType  value  )  const [inline]

Evaluate the outcome of the mapping for a given input value.

Definition at line 211 of file Mapping.h.


Friends And Related Function Documentation

template<class InType, class OutType>
friend class Mapping [friend]

Definition at line 239 of file Mapping.h.


The documentation for this class was generated from the following file:
Generated on Mon Feb 25 12:49:59 2013 for NemoMath by  doxygen 1.6.3