Evocosm - A C++ Framework for Evolutionary Computing

Main Index

Created by Scott Robert Ladd at Coyote Gulch Productions.


libevocosm::reporter< OrganismType, LandscapeType > Class Template Reference

Reports on a given population. More...

#include <reporter.h>

Inheritance diagram for libevocosm::reporter< OrganismType, LandscapeType >:

libevocosm::globals List of all members.

Public Member Functions

Protected Attributes


Detailed Description

template<typename OrganismType, typename LandscapeType>
class libevocosm::reporter< OrganismType, LandscapeType >

A reporter can be many things; essentially, after fitness testing, the standard evocosm implementation calls a reporter to display information about the population and to find out if the population has reached some "final" or "finished" state.
Parameters:
OrganismType - The type of organism


Constructor & Destructor Documentation

template<typename OrganismType, typename LandscapeType>
libevocosm::reporter< OrganismType, LandscapeType >::reporter listener a_listener  )  [inline]
 

Creates a new reporter object

Parameters:
a_listener - a listener for events

template<typename OrganismType, typename LandscapeType>
virtual libevocosm::reporter< OrganismType, LandscapeType >::~reporter  )  [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.


Member Function Documentation

template<typename OrganismType, typename LandscapeType>
virtual bool libevocosm::reporter< OrganismType, LandscapeType >::report const vector< vector< OrganismType > > &  a_population,
size_t  a_iteration,
double &  a_fitness,
bool  a_finished = false
[pure 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 evolution (changes in the population) or not.

Parameters:
a_population - A population of organisms
a_iteration - Iteration count for this report
a_fitness - Assigned the fitness value; implementation-defined
a_finished - When true, indicates that this is the last report for a given run
Returns:
true if the evocosm should evolve the population more; false if no evolution is required.


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

© 1996-2005 Scott Robert Ladd. All rights reserved.
HTML documentation generated by Dimitri van Heesch's excellent Doxygen tool.