A range of double values, to be used to map certain values from one range to another.
More...
#include </home/werner/origo/vish/ocean/shrimp/Range.hpp>
List of all members.
Public Member Functions
-
override double applyFunctor (double x) const
- Implementation of the functor operation, calls map_01_to_minmax()
-
double bias () const
- Alias for minimum.
-
void expand (double d)
- Expand the current range to contain the given value.
-
void expand (const Range &R)
- Expand the current range by the other range.
-
double inv_bias () const
-
double inv_scale () const
-
bool invalid () const
- Return info if the range is valid, i.e. has positive range.
-
bool isIdentity () const
- Check if this range is from 0.0 to 1.0, which would be the identity map.
-
double map_01_to_minmax (double d) const
- Map a value in the range [0,1] to the range [min,max].
-
double map_minmax_to_01 (double d) const
- Map value in the range [min,max] to the range [0,1].
-
double Max () const
- maximum value
-
double & Max ()
- modifyable maximum value
-
double Min () const
- minimum value
-
double & Min ()
- modifyable minimum value
-
double offset () const
- Alias for minimum.
-
double operator() (double x) const
- Implementation of the functor operation, which is just the value mapping into the range interval, ie. [0,1] --> [min,max].
-
Range operator~ () const
- Compute the inverse range mapping.
-
Range (double theMin=0.0, double theMax=1.0)
- Constructor, specify min and max.
-
Range (double scale, double offset, bool)
- Construct a range from scale and offset.
-
Range (const Range &R)
- Copy constructor.
-
Range (const Range &R, bool)
- Computational constructor constructing the inverse range mapping.
-
double scale () const
- Range interval length (max-min)
-
void setInverse (const Range &R)
-
void setRange (const Range &R)
- copies values
-
void setScaleOffset (double scale, double offset)
- Set range to [offset, offset+scale].
Static Public Attributes
-
static bool TypenameInitialized = InitRangeTypename()
Detailed Description
A range of double values, to be used to map certain values from one range to another.
Mapping formula is
The documentation for this class was generated from the following files:
- ocean/shrimp/Range.hpp
- ocean/shrimp/Range.cpp