GLBaseBreeder Class Reference

#include <GLBaseBreeder.h>

Inheritance diagram for GLBaseBreeder:

GLBreederStandard

List of all members.

Public Member Functions

 GLBaseBreeder (GLBaseCrossover *crossover)
virtual ~GLBaseBreeder ()
virtual int breedOrganisms (GLBasePopulation *population, GLBaseOrganismStorage *potential_parents, GLBaseOrganismStorage *offsprings, GLConstants::TStorageFilling fill=GLConstants::APPEND, GLConstants::TTwinsFlags twins=GLConstants::NO_TWINS, int size_limits=-1)=0
GLBaseCrossovergetCrossover ()
const GLBaseCrossovergetCrossover () const
virtual void reset ()


Detailed Description

Base breeder class -- takes some container with organisms and fills the new container with offsprings using certain crossover.

Definition at line 12 of file GLBaseBreeder.h.


Constructor & Destructor Documentation

GLBaseBreeder::GLBaseBreeder ( GLBaseCrossover crossover  ) 

Simple constructor. Assigns the crossover which will be used for breeding.

Definition at line 8 of file GLBaseBreeder.cpp.

GLBaseBreeder::~GLBaseBreeder (  )  [virtual]

Destructor, destroys everything, including crossover.

Definition at line 19 of file GLBaseBreeder.cpp.


Member Function Documentation

virtual int GLBaseBreeder::breedOrganisms ( GLBasePopulation population,
GLBaseOrganismStorage potential_parents,
GLBaseOrganismStorage offsprings,
GLConstants::TStorageFilling  fill = GLConstants::APPEND,
GLConstants::TTwinsFlags  twins = GLConstants::NO_TWINS,
int  size_limits = -1 
) [pure virtual]

Breeds organisms -- produces the offsprings from parents based on certain criteria using the crossover owned by this breeder.

Parameters:
population population to which parents belong -- mainly to be able to check the uniqueness of the new offsprings.
potential_parents organisms to be bred.
offsprings storage place to store the children.
fill when true adds the organisms to the storage.
twins when true all the offsprings will be checked for uniqueness with the parent's population before being added to the storage of offsprings.
size_limits limit number of produced offsprings. When < 0 all the offsprings generated by the algorithm will be returned.
Returns:
number of offsprings produced.

Implemented in GLBreederStandard.

const GLBaseCrossover* GLBaseBreeder::getCrossover (  )  const [inline]

Returns the crossover which is used by the breeder.

Returns:
crossover which this breeder uses.

Definition at line 61 of file GLBaseBreeder.h.

GLBaseCrossover* GLBaseBreeder::getCrossover (  )  [inline]

Returns the crossover which is used by the breeder.

Returns:
crossover which this breeder uses.

Definition at line 54 of file GLBaseBreeder.h.

void GLBaseBreeder::reset (  )  [virtual]

Resets breeder (e.g. sets counter, if any, to zero etc.) and its crossover.

Definition at line 29 of file GLBaseBreeder.cpp.


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

Generated on Sat Jun 13 13:58:05 2009 for GenLib by  doxygen 1.5.9