EvolvingObjects

Defines bound classes for real numbers. More...
#include <es/eoIntBounds.h>
Public Member Functions  
virtual bool  isBounded (void) const =0 
SelfTest: true if ***both*** a min and a max.  
virtual bool  hasNoBoundAtAll (void) const =0 
SelfTest: true if no min ***and*** no max hence no further need to test/truncate/fold anything.  
virtual bool  isMinBounded (void) const =0 
SelfTest: bounded from below???  
virtual bool  isMaxBounded (void) const =0 
SelfTest: 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  foldsInBounds (long int &i) const 
foldsInBounds for ints: call the method for double and convert back  
virtual void  truncate (double &) const =0 
Put value back into bounds  by truncating to a boundary value.  
virtual void  truncate (long int &i) const 
truncate for ints: call the method for double and convert back  
virtual long int  minimum () const =0 
get minimum value std::exception if does not exist  
virtual long int  maximum () const =0 
get maximum value std::exception if does not exist  
virtual long int  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 uses same naming convention than eo::rng std::exception if unbounded  
virtual long int  random (eoRng &_rng=eo::rng) const =0 
virtual eoIntBounds *  dup () const =0 
for memory managements  ugly 
Defines bound classes for real numbers.
Scalar type:  Basic class is eoIntBounds, 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 eoIntInterval that holds a minimum and maximum value, eoIntNoBounds the "unbounded bounds" (infinity, +infinity) eoIntBelowBound the halfbounded interval [min, +infinity) eoIntAboveBound the halfbounded interval (infinity, max]
THis file also contains the declaration of *the* global object that is the unbounded bound
Definition at line 70 of file eoIntBounds.h.