Evocosm - A C++ Framework for Evolutionary Computing

Main Index

Created by Scott Robert Ladd at Coyote Gulch Productions.


Public Member Functions | List of all members
libevocosm::function_analyzer Class Reference

Reports the state of a population of solutions. More...

#include <function_optimizer.h>

Inheritance diagram for libevocosm::function_analyzer:
libevocosm::analyzer< function_solution > libevocosm::globals

Public Member Functions

 function_analyzer (listener< function_solution > &a_listener, size_t max_iterations)
 Constructor. More...
 
virtual bool analyze (const vector< function_solution > &a_population, size_t a_iteration, double &a_fitness)
 Reports on a population. More...
 
- Public Member Functions inherited from libevocosm::analyzer< function_solution >
 analyzer (listener< function_solution > &a_listener, size_t max_iterations=0)
 Constructor. More...
 
 analyzer (const analyzer &a_source)
 Copy constructor.
 
analyzeroperator= (const analyzer &a_source)
 Assignment operator.
 
virtual ~analyzer ()
 Virtual destructor. More...
 
virtual bool analyze (const vector< function_solution > &a_population, size_t a_iteration)
 Reports on a population. More...
 

Additional Inherited Members

- Static Protected Member Functions inherited from libevocosm::globals
static size_t rand_index (size_t n)
 Static function to allow use of g_random function pointer in random_shuffle.
 
static void set_seed (uint32_t a_seed)
 Set the seed for the random number generator.
 
static uint32_t get_seed ()
 Set the seed for the random number generator.
 
static std::string version ()
 Get version number.
 
- Protected Attributes inherited from libevocosm::analyzer< function_solution >
listener< function_solution > & m_listener
 The listener for events.
 
size_t m_max_iterations
 Maximum iterations; ignored if zero.
 
- Static Protected Attributes inherited from libevocosm::globals
static prng g_random
 A shared random number generator.
 
static std::string g_version
 Version number.
 

Detailed Description

A simple analyzer for diaplying information about the populations as it evolves.

Constructor & Destructor Documentation

libevocosm::function_analyzer::function_analyzer ( listener< function_solution > &  a_listener,
size_t  max_iterations 
)
inline

Creates a new analyzer object

Parameters
a_listener- a listener for events

Member Function Documentation

virtual bool libevocosm::function_analyzer::analyze ( const vector< function_solution > &  a_population,
size_t  a_iteration,
double &  a_fitness 
)
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
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.