Gamma  0.9.5
Generic Synthesis Library
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator
UnitMapper< T > Class Template Reference

Maps a unit value through an invertible function. More...

#include <UnitMaps.h>

List of all members.

Public Types

enum  MapType { MAP_LIN, MAP_POW, MAP_EXP2 }
 Mapping types. More...

Public Member Functions

 UnitMapper (T max, T min=0., T p1=1., MapType type=MAP_POW, bool clip=true)
UnitMapperset (T max, T min=0., T p1=1., MapType type=MAP_POW, bool clip=true)
 Set all attributes.
map (T unit)
 Map a unit value.
unmap (T value)
 Unmap a value to a unit value.

Detailed Description

template<class T>
class gam::UnitMapper< T >

Maps a unit value through an invertible function.


Member Enumeration Documentation

enum MapType

Mapping types.

Enumerator:
MAP_LIN 

b0 + u * (b1-b0)

MAP_POW 

b0 + u^p * (b1-b0)

MAP_EXP2 

p 2^[b0 + u * (b1-b0)]


Constructor & Destructor Documentation

UnitMapper ( max,
min = 0.,
p1 = 1.,
MapType  type = MAP_POW,
bool  clip = true 
)
Parameters:
[in]maxupper endpoint of interval
[in]minlower endpoint of interval
[in]p1mapping function function parameter
[in]typemapping function
[in]clipwhether to clip values to interval

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