Differential Evolution C++ library
de::real_constraint Class Reference

#include <de_constraints.hpp>

Inheritance diagram for de::real_constraint:
Collaboration diagram for de::real_constraint:

List of all members.

Public Member Functions

 real_constraint (double min, double max)
double get_rand_value ()
double get_rand_value (double value, double origin)
virtual double get_rand_value_in_zone (double origin, double zonePct) const
virtual double get_middle_point ()

Detailed Description

A real constraint. Specifies that variables can have any double value, whitin the specified limits.

Author:
adrian (12/1/2011)

Constructor & Destructor Documentation

de::real_constraint::real_constraint ( double  min,
double  max 
) [inline]

constructor that takes the min and max limit of the real constraint

Author:
adrian (12/4/2011)
Parameters:
min
max

Member Function Documentation

virtual double de::real_constraint::get_middle_point ( ) [inline, virtual]

Gets the point midway between min and max - will only work for range constraints

Author:
adrian (12/16/2011)
Returns:
double

Implements de::constraint.

Here is the call graph for this function:

double de::real_constraint::get_rand_value ( ) [inline, virtual]

returns a random value limited to the type and range of the constraint

Author:
adrian (12/4/2011)
Returns:
double

Implements de::constraint.

Here is the call graph for this function:

double de::real_constraint::get_rand_value ( double  value,
double  origin 
) [inline, virtual]

returns a random value limited to the type and range of the constraint based on a previous value and an origin

Author:
adrian (12/4/2011)
Parameters:
value
origin
Returns:
double

Implements de::constraint.

Here is the call graph for this function:

virtual double de::real_constraint::get_rand_value_in_zone ( double  origin,
double  zonePct 
) const [inline, virtual]

Gets a random value within the limits set for the constraint, but further limited to a range defined by its origin and the width of the zone around this origin in pct of the total width

Author:
adrian (12/13/2011)
Parameters:
originthe origin (center) of the zone further limiting the constraint
zonePctthe width of the zone in pct of the total width, around the origin
Returns:
double

Implements de::constraint.

Here is the call graph for this function:


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