Created by Scott Robert Ladd at Coyote Gulch Productions.
Reports on a given population. More...
#include <analyzer.h>
After fitness testing, the Evocosm invokes an analyzer. At a minimum, the analyzer determines if the population has reached a "final" or "finished" state.
OrganismType | - The type of organism |
libevocosm::analyzer< OrganismType >::analyzer | ( | listener< OrganismType > & | a_listener, |
size_t | max_iterations = 0 |
||
) | [inline] |
Creates a new reporter object
a_listener | - a listener for events |
virtual libevocosm::analyzer< OrganismType >::~analyzer | ( | ) | [inline, virtual] |
A virtual destructor. By default, it does nothing; this is a placeholder that identifies this class as a potential base, ensuring that objects of a derived class will have their destructors called if they are destroyed through a base-class pointer.
virtual bool libevocosm::analyzer< OrganismType >::analyze | ( | const vector< OrganismType > & | a_population, |
size_t | a_iteration | ||
) | [inline, virtual] |
The report method can do almost anything. In most case, it will display the "best" chromosome, draw a progress graph, or notify the user that another generation has passed. The return value tells an evocosm whether to continue evolving or not. The default implementation simply watches to see if a maximum number of iterations ahve been perfromed.
a_population | - A population of organisms |
a_iteration | - Iteration count for this report |
© 1996-2005 Scott Robert Ladd. All rights reserved.
HTML documentation generated by Dimitri van Heesch's excellent Doxygen tool.