Created by Scott Robert Ladd at Coyote Gulch Productions.
A toolkit and framework for implementing evolutionary algorithms. More...
Classes | |
| class | all_selector |
| A do-nothing selector. More... | |
| class | analyzer |
| Reports on a given population. More... | |
| class | elitism_selector |
| Implements a elitism selector. More... | |
| class | evocosm |
| Associates organisms with the components of an evolutionary system. More... | |
| class | evoreal |
| Tools for evolving real numbers. More... | |
| class | exponential_scaler |
| An exponential fitness scaler. More... | |
| class | fitness_stats |
| Population fitness statistics. More... | |
| class | fopt_global |
| Global things used by all optimizer classes. More... | |
| class | function_analyzer |
| Reports the state of a population of solutions. More... | |
| class | function_landscape |
| Defines the test for a population of solutions. More... | |
| class | function_listener |
| An listener implementation that ignores all events. More... | |
| class | function_mutator |
| Mutates solutions. More... | |
| class | function_optimizer |
| A generic function optimizer. More... | |
| class | function_reproducer |
| Implements reproduction. More... | |
| class | function_solution |
| A potential solution to the problem at hand. More... | |
| class | fuzzy_machine |
| A finite state machine. More... | |
| class | globals |
| Elements shared by all classes in Evocosm. More... | |
| class | landscape |
| An abstract interface defining a fitness landscape. More... | |
| class | linear_norm_scaler |
| A linear normalization scaler. More... | |
| class | listener |
| An abstract interface defining a listener. More... | |
| class | machine_tools |
| A set of common tools for finite state machines. More... | |
| class | mutator |
| Mutates organisms. More... | |
| class | null_listener |
| An listener implementation that ignores all events. More... | |
| class | null_scaler |
| A do-nothing scaler. More... | |
| class | null_selector |
| A do-nothing selector. More... | |
| class | organism |
| An evolving organism. More... | |
| class | population |
| class | prng |
| The random number generator used by Evocosm. More... | |
| class | quadratic_scaler |
| A quadratic scaler. More... | |
| class | reproducer |
| Creates new organisms from an existing population. More... | |
| class | roulette_wheel |
| A simulated roulette wheel for weighted selection. More... | |
| class | scaler |
| Fitness scaling for a population. More... | |
| class | selector |
| Selects organisms that survive. More... | |
| class | sigma_scaler |
| A sigma scaler. More... | |
| class | simple_machine |
| A simple finite state machine with integer-indexed states. More... | |
| class | state_machine |
| A finite state machine. More... | |
| class | validation_error |
| Standard validation exception. More... | |
| class | windowed_scaler |
| A windowed fitness scaler. More... | |
Functions | |
| template<typename Type > | |
| void | validate_equals (const Type &object, const Type &constraint, const string &message=string()) |
| Validates that an object has a specific value. More... | |
| template<typename Type > | |
| void | validate_not (const Type &object, const Type &constraint, const string &message=string()) |
| Validates that an object does not have a specific value. More... | |
| template<typename Type > | |
| void | validate_less (const Type &object, const Type &constraint, const string &message=string()) |
| Validates that an object is less than constraint. More... | |
| template<typename Type > | |
| void | validate_less_eq (const Type &object, const Type &constraint, const string &message=string()) |
| Validates that an object is less than or equal to constraint. More... | |
| template<typename Type > | |
| void | validate_greater (const Type &object, const Type &constraint, const string &message=string()) |
| Validates that an object is greater than constraint. More... | |
| template<typename Type > | |
| void | validate_greater_eq (const Type &object, const Type &constraint, const string &message=string()) |
| Validates that an object is greater than or equal to constraint. More... | |
| template<typename Type > | |
| void | validate_range (const Type &object, const Type &low_bound, const Type &high_bound, const string &message=string()) |
| Validates that an object has a value in a specified range. More... | |
| template<typename Type , typename Predicate > | |
| void | validate_with (const Type &object, const Predicate &constraint, const string &message=string()) |
| Validates an object with a given predicate. More... | |
| template<typename Type > | |
| void | enforce_lower_limit (Type &object, const Type &low_value) |
| Enforce a lower limit on the value of an object. More... | |
| template<typename Type > | |
| void | enforce_upper_limit (Type &object, const Type &high_value) |
| Enforce an upper limit on the value of an object. More... | |
| template<typename Type > | |
| void | enforce_index (Type &object, const Type &array_length) |
| Enforce an maximum index on the value of an object. More... | |
| template<typename Type > | |
| void | enforce_range (Type &object, const Type &low_value, const Type &high_value) |
| Enforce an range limit on the value of an object. More... | |
| string | build_location_string (const char *filename, long line_no) |
| Utility function to create a location string. More... | |
Evocosm classes abstract the fundamental components of an evolutionary algorithm. Evolutionary algorithms come in a variety of shapes and flavors, but at their core, they all share certain characteristics: populations that reproduce and mutate through a series of generations, producing future generations based on some measure of fitness. An amazing variety of algorithms can be built on that general framework, which lead me to construct a set of core classes as the basis for future applications.
|
inline |
This function formats a string from a given file name and line number. If C++ incorporates parts of C99, this function could be extended to support the __func__ macro that names the current function.
| filename | The name of a file, usually the Standard C __FILE__ macro |
| line_no | A line number in the file, usually the Standard C __LINE__ macro |
| void libevocosm::enforce_index | ( | Type & | object, |
| const Type & | array_length | ||
| ) |
If object's value is greater than or equal to array_length, as per the >= operator, object will be set equal to array_length.
| object | Object to undergo enforcement |
| array_length | Length of array that object must address |
| void libevocosm::enforce_lower_limit | ( | Type & | object, |
| const Type & | low_value | ||
| ) |
If object's value is less than low_value, as per the < operator, object will be set equal to low_value.
| object | Object to undergo enforcement |
| low_value | Lower limit on the value of object |
| void libevocosm::enforce_range | ( | Type & | object, |
| const Type & | low_value, | ||
| const Type & | high_value | ||
| ) |
If object's value is less than low_value, as per the < operator, object will be set equal to low_value. If object's value is greater than high_value, as per the > operator, object will be set equal to high_value.
| object | Object to undergo enforcement |
| low_value | Lower limit on the value of object |
| high_value | Upper limit on the value of object |
| void libevocosm::enforce_upper_limit | ( | Type & | object, |
| const Type & | high_value | ||
| ) |
If object's value is greater than high_value, as per the > operator, object will be set equal to high_value.
| object | Object to undergo enforcement |
| high_value | Upper limit on the value of object |
| void libevocosm::validate_equals | ( | const Type & | object, |
| const Type & | constraint, | ||
| const string & | message = string() |
||
| ) |
If value is not equal to constraint, as defined by the appropriate == operator, this function throws a validation_error.
| object | Object to be tested against constraint |
| constraint | Expected value of object |
| message | Additional text to be included in a validation_error |
| void libevocosm::validate_greater | ( | const Type & | object, |
| const Type & | constraint, | ||
| const string & | message = string() |
||
| ) |
If value is less than or equal to constraint (using the <= operator), this function throws a validation_error.
| object | Object to be tested |
| constraint | Object must be > than this value |
| message | Additional text to be included in a validation_error |
| void libevocosm::validate_greater_eq | ( | const Type & | object, |
| const Type & | constraint, | ||
| const string & | message = string() |
||
| ) |
If value is less than or equal to constraint (using the <= operator), this function throws a validation_error.
| object | Object to be tested |
| constraint | Object must be > than this value |
| message | Additional text to be included in a validation_error |
| void libevocosm::validate_less | ( | const Type & | object, |
| const Type & | constraint, | ||
| const string & | message = string() |
||
| ) |
If value is greater than or equal to constraint (using the >= operator), this function throws a validation_error.
| object | Object to be tested |
| constraint | Object must be < than this value |
| message | Additional text to be included in a validation_error |
| void libevocosm::validate_less_eq | ( | const Type & | object, |
| const Type & | constraint, | ||
| const string & | message = string() |
||
| ) |
If value is greater than or equal to constraint (using the >= operator), this function throws a validation_error.
| object | Object to be tested |
| constraint | Object must be < than this value |
| message | Additional text to be included in a validation_error |
| void libevocosm::validate_not | ( | const Type & | object, |
| const Type & | constraint, | ||
| const string & | message = string() |
||
| ) |
If value equals the constraint, as defined by the appropriate == operator, this function throws a validation_error.
| object | Object to be tested against constraint |
| constraint | Value that object should not equal |
| message | Additional text to be included in a validation_error |
| void libevocosm::validate_range | ( | const Type & | object, |
| const Type & | low_bound, | ||
| const Type & | high_bound, | ||
| const string & | message = string() |
||
| ) |
If value is less than low_bound (using the < operator) or greater than high_bound (using the > operator), this function throws a validation_error. The function does not verify that low_bound is less than high_bound.
| object | Object to be tested |
| low_bound | Low boundary (inclusive) on value of object |
| high_bound | High boundary (inclusive) on value of object |
| message | Additional text to be included in a validation_error |
| void libevocosm::validate_with | ( | const Type & | object, |
| const Predicate & | constraint, | ||
| const string & | message = string() |
||
| ) |
If predicate(object) is false – indicating an invalid object in the context defined by predicate – this function throws a validation_error.
| object | Object to be tested against the predicate |
| constraint | A function or functor returning true for valid objects and false for an invalid object |
| message | Additional text to be included in a validation_error |
© 1996-2005 Scott Robert Ladd. All rights reserved.
HTML documentation generated by Dimitri van Heesch's excellent Doxygen tool.