Created by Scott Robert Ladd at Coyote Gulch Productions.
A generic function optimizer. More...
#include <function_optimizer.h>
Public Member Functions | |
| function_optimizer (t_function *a_function, size_t a_nargs, double a_minarg, double a_maxarg, size_t a_norgs, double a_mutation_rate, size_t a_iterations) | |
| Constructor. More... | |
| virtual | ~function_optimizer () |
| Destructor. More... | |
| void | run () |
| Performs optimization. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from libevocosm::function_listener | |
| virtual void | ping_generation_begin (size_t a_iteration) |
| Ping that a generation begins. More... | |
| virtual void | ping_generation_end (const vector< function_solution > &a_population, size_t a_iteration) |
| Ping that a generation ends. More... | |
Using instances of the other classes, this class binds together the pieces to create a complete function optimizer. A user of this class defines two functions – a solution initializer and a fitness test – that define the target problem.
| libevocosm::function_optimizer::function_optimizer | ( | t_function * | a_function, |
| size_t | a_nargs, | ||
| double | a_minarg, | ||
| double | a_maxarg, | ||
| size_t | a_norgs, | ||
| double | a_mutation_rate, | ||
| size_t | a_iterations | ||
| ) |
Creates a new function_optimizer with the given set of parameters.
| a_function | - Address of the function to be optimized. |
| a_nargs | - number of arguments per solution |
| a_minarg | - minimum argument value |
| a_maxarg | - maximum argument value |
| a_norgs | - The size of the solution population. |
| a_mutation_rate | - Mutation rate in the range [0,1]. |
| a_iterations | - Number of iterations to perform when doing a run. |
|
virtual |
Cleans up resources by removing allocated objects.
| void libevocosm::function_optimizer::run | ( | ) |
This is where the work gets done; run iterates the number of times specificed when creating this function_optimizer, reporting via a function_analyzer object on the progress of optimization.
© 1996-2005 Scott Robert Ladd. All rights reserved.
HTML documentation generated by Dimitri van Heesch's excellent Doxygen tool.