Differential Evolution C++ library
|
#include <de_constraints.hpp>
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 () |
A real constraint. Specifies that variables can have any double value, whitin the specified limits.
de::real_constraint::real_constraint | ( | double | min, |
double | max | ||
) | [inline] |
constructor that takes the min and max limit of the real constraint
min | |
max |
virtual double de::real_constraint::get_middle_point | ( | ) | [inline, virtual] |
Gets the point midway between min and max - will only work for range constraints
Implements de::constraint.
double de::real_constraint::get_rand_value | ( | ) | [inline, virtual] |
returns a random value limited to the type and range of the constraint
Implements de::constraint.
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
value | |
origin |
Implements de::constraint.
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
origin | the origin (center) of the zone further limiting the constraint |
zonePct | the width of the zone in pct of the total width, around the origin |
Implements de::constraint.