# eoRealBounds Class Reference
[EvolutionStrategies]

Defines bound classes for real numbers. More...

`#include <es/eoRealBounds.h>`

Inheritance diagram for eoRealBounds:

List of all members.

## 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 ::exception if does not exist
virtual double | maximum () const =0
| get maximum value ::exception if does not exist
virtual double | range () const =0
| get range ::exception if unbounded
virtual double | uniform (eoRng &_rng=eo::rng) const =0
| random generator of uniform numbers in bounds ::exception if unbounded
virtual eoRealBounds * | dup () const =0
| for memory managements - ugly

## Detailed Description

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:

- void foldsInBounds(double &) that folds any value that falls out of the bounds back into the bounds, by bouncing on the limit (if any)
- bool isInBounds(double) that simply says whether or not the argument is in the bounds
- void truncate(double &) that set the argument to the bound value it it exceeds it

So mutation can choose

- iterate trying until they fall in bounds,
- only try once and "restd::pair" by using the foldsInBounds method
- only try once and restd::pair using the truncate method (will create a huge bias toward the bound if the soluiton is not far from the bounds)

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 75 of file eoRealBounds.h.

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

- eoRealBounds.h