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

#include <de_constraints.hpp>

Inheritance diagram for de::constraint:

List of all members.

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

Detailed Description

Abstract base class for concrete constraint classes

A constraint class describes certain characteristics and limits of the input variables fed to the objective function.

Author:
adrian (12/1/2011)

Member Function Documentation

virtual double de::constraint::get_middle_point ( ) [pure virtual]

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

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

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

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

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)

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

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

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

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

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

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

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

Implemented in de::boolean_constraint, de::set_constraint, and de::range_constraint.


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