Evocosm - A C++ Framework for Evolutionary Computing

Main Index

Created by Scott Robert Ladd at Coyote Gulch Productions.


Public Member Functions
libevocosm::function_reproducer Class Reference

Implements reproduction. More...

#include <function_optimizer.h>

Inheritance diagram for libevocosm::function_reproducer:
libevocosm::reproducer< function_solution > libevocosm::fopt_global libevocosm::globals

List of all members.

Public Member Functions

 function_reproducer (double p_crossover_rate=1.0)
 Creation constructor.
 function_reproducer (const function_reproducer &a_source)
 Copy constructor.
virtual ~function_reproducer ()
 Virtual destructor.
function_reproduceroperator= (const function_reproducer &a_source)
 Assignment operator.
double crossover_rate () const
 Gets the crossover rate.
virtual vector< function_solutionbreed (const vector< function_solution > &a_population, size_t p_limit)
 Reproduction for solutions.
- Public Member Functions inherited from libevocosm::reproducer< function_solution >
virtual ~reproducer ()
 Virtual destructor.

Additional Inherited Members


Detailed Description

Handles reproduction for solutions.


Constructor & Destructor Documentation

libevocosm::function_reproducer::function_reproducer ( double  p_crossover_rate = 1.0)
inline

Creates a new reproducer with a given crossover rate.

libevocosm::function_reproducer::function_reproducer ( const function_reproducer a_source)
inline

Duplicates an existing object.

Parameters:
a_source- The source object
virtual libevocosm::function_reproducer::~function_reproducer ( )
inlinevirtual

Satisfies the requirements of the base class; does nothing at this time.


Member Function Documentation

virtual vector<function_solution> libevocosm::function_reproducer::breed ( const vector< function_solution > &  a_population,
size_t  p_limit 
)
virtual

Breeds new solutions, by cloning or the combination of elements from parent organisms. By default, the crossover rate is 1.0 (100%), meaning that all children stem from crossover between two parents. The crossover is implemented on a argument-by-argument basis; in other words, crossover occurs between corresponding elements of the parent solutions.

Parameters:
a_population- A population of solutions
p_limit- Maximum number of children
Returns:
A vector containing new "child" chromosomes

Implements libevocosm::reproducer< function_solution >.

double libevocosm::function_reproducer::crossover_rate ( ) const
inline

Returns the crossover rate set for this reproducer.

Returns:
Crossover rate
function_reproducer& libevocosm::function_reproducer::operator= ( const function_reproducer a_source)
inline

Assigns the state of one object to another.

Parameters:
a_source- The source object
Returns:
A reference to this

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.