#include <de_constraints.hpp>
List of all members.
Detailed Description
A collection of constraints, implemented as a vector.
Is used to define the constraints for all variables used during an optimization session.
- Author:
- adrian (12/1/2011)
Constructor & Destructor Documentation
de::constraints::constraints |
( |
size_t |
varCount, |
|
|
double |
defMin, |
|
|
double |
defMax |
|
) |
| [inline] |
Initializes a collection of constraints with default values. All constraints are of type real and have the same default min and max.
- Author:
- adrian (12/1/2011)
- Parameters:
-
varCount | number of constraints |
defMin | default min limit |
defMax | default max limit |
de::constraints::constraints |
( |
const std::vector< std::string > & |
str, |
|
|
size_t |
var_count, |
|
|
double |
def_min, |
|
|
double |
def_max |
|
) |
| [inline] |
Initializes a collection of constraints from string descsriptions. Currently used only for range based constraints.
A constraint can be described as "type;min;max" where type can be real or integer and min and max are the range limits.
- Author:
- adrian (12/1/2011)
- Parameters:
-
str | a a collection (vector) of constraint description strings, each string describing constraints for one variable |
var_count | the total number of variables (can be different than the number of strings). If there are more variables than strings, the extra constraints are set to be real and use the default min and max arguments for the range |
def_min | default min value in case the number of variables is higher than the number of constraints specified as strings. |
def_max | default max value in case the number of variables is higher than the number of constraints specified as strings. |
Member Function Documentation
double de::constraints::get_rand_value |
( |
size_t |
index | ) |
[inline] |
returns a random value limited to the type and range of the constraint
- Author:
- adrian (12/4/2011)
- Returns:
- double
double de::constraints::get_rand_value |
( |
size_t |
index, |
|
|
double |
value, |
|
|
double |
origin |
|
) |
| [inline] |
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:
-
index | the constraint index |
value | previous value |
origin | origin |
- Returns:
- double
DVectorPtr de::constraints::get_rand_values |
( |
| ) |
const [inline] |
Get a set of random values within the limits set by the constraints
- Author:
- adrian (12/13/2011)
- Returns:
- DVectorPtr
DVectorPtr de::constraints::get_square_zone_rand_values |
( |
const DVectorPtr |
origin, |
|
|
double |
sidePct |
|
) |
| const [inline] |
Generates a set of random values within a "hypercube" region defined by an origin and an area expressed as a percentage of the entire range
- Author:
- adrian (12/13/2011)
- Parameters:
-
origin | the origin coordinates of the region |
sidePct | the side of the hypercube in pct of the entire side |
- Returns:
- DVectorPtr
The documentation for this class was generated from the following file: