Differential Evolution C++ library
|
#include <de_constraints.hpp>
Public Member Functions | |
virtual double | get_rand_value ()=0 |
virtual double | get_rand_value (double value, double origin)=0 |
virtual double | min () const =0 |
virtual double | max () const =0 |
virtual double | get_rand_value_in_zone (double origin, double zonePct) const =0 |
virtual double | get_middle_point ()=0 |
Abstract base class for concrete constraint classes
A constraint class describes certain characteristics and limits of the input variables fed to the objective function.
virtual double de::constraint::get_middle_point | ( | ) | [pure virtual] |
Gets the point midway between min and max - will only work for range constraints
Implemented in de::boolean_constraint, de::set_constraint, de::int_constraint, and de::real_constraint.
virtual double de::constraint::get_rand_value | ( | ) | [pure virtual] |
returns a random value limited to the type and range of the constraint
Implemented in de::boolean_constraint, de::set_constraint, de::int_constraint, and de::real_constraint.
virtual double de::constraint::get_rand_value | ( | double | value, |
double | origin | ||
) | [pure virtual] |
returns a random value limited to the type and range of the constraint based on a previous value and an origin (see specific implementation in derived classes)
value | |
origin |
Implemented in de::boolean_constraint, de::set_constraint, de::int_constraint, and de::real_constraint.
virtual double de::constraint::get_rand_value_in_zone | ( | double | origin, |
double | zonePct | ||
) | const [pure 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 |
Implemented in de::boolean_constraint, de::set_constraint, de::int_constraint, and de::real_constraint.
virtual double de::constraint::max | ( | ) | const [pure virtual] |
returns the max limit of the range
Implemented in de::boolean_constraint, de::set_constraint, and de::range_constraint.
virtual double de::constraint::min | ( | ) | const [pure virtual] |
returns the min limit of the range
Implemented in de::boolean_constraint, de::set_constraint, and de::range_constraint.