EvolvingObjects
|
Defines bound classes for real numbers. More...
#include <es/eoRealBounds.h>
Public Member Functions | |
virtual bool | isBounded (void) const =0 |
Self-Test: true if ***both*** a min and a max. | |
virtual bool | hasNoBoundAtAll (void) const =0 |
Self-Test: true if no min ***and*** no max hence no further need to test/truncate/fold anything. | |
virtual bool | isMinBounded (void) const =0 |
Self-Test: bounded from below??? | |
virtual bool | isMaxBounded (void) const =0 |
Self-Test: bounded from above??? | |
virtual bool | isInBounds (double) const =0 |
Test on a value: is it in bounds? | |
virtual void | foldsInBounds (double &) const =0 |
Put value back into bounds - by folding back and forth. | |
virtual void | truncate (double &) const =0 |
Put value back into bounds - by truncating to a boundary value. | |
virtual double | minimum () const =0 |
get minimum value std::exception if does not exist | |
virtual double | maximum () const =0 |
get maximum value std::exception if does not exist | |
virtual double | range () const =0 |
get range std::exception if unbounded | |
virtual double | uniform (eoRng &_rng=eo::rng) const =0 |
random generator of uniform numbers in bounds std::exception if unbounded | |
virtual eoRealBounds * | dup () const =0 |
for memory managements - ugly |
Defines bound classes for real numbers.
Scalar type: ------------ Basic class is eoRealBounds, a pure virtual.
The following pure virtual methods are to be used in mutations:
So mutation can choose
There is also a uniform() method that generates a uniform value (if possible, i.e. if bounded) in the interval.
Derived class are eoRealInterval that holds a minimum and maximum value, eoRealNoBounds the "unbounded bounds" (-infinity, +infinity) eoRealBelowBound the half-bounded interval [min, +infinity) eoRealAboveBound the half-bounded interval (-infinity, max]
THis file also contains the declaration of *the* global object that is the unbounded bound
Definition at line 85 of file eoRealBounds.h.