GLSelectionistStandard Class Reference

#include <GLSelectionistStandard.h>

Inheritance diagram for GLSelectionistStandard:

GLBaseSelectionist

List of all members.

Public Member Functions

 GLSelectionistStandard (GLBaseRanker *ranker)
virtual ~GLSelectionistStandard ()
virtual int doSelection (const vector< GLBaseOrganism * > &current_population, const vector< GLBaseOrganism * > &new_generation, size_t new_size, vector< GLBaseOrganism * > &to_live, vector< GLBaseOrganism * > &to_die, vector< const GLBaseOrganism * > &best_survived)


Detailed Description

Standard selectionist -- merges all the organisms in single pool, sorts them according to fitness value and then chooses the best to move to the next generation.

Definition at line 11 of file GLSelectionistStandard.h.


Constructor & Destructor Documentation

GLSelectionistStandard::GLSelectionistStandard ( GLBaseRanker ranker  )  [inline]

Constructor. Assigns the operator which will be used for ranking the organisms. Note, that the ranker will be destroyed when destructor is called.

Parameters:
ranker operator for arranging the organisms in accordance with their rank.

Definition at line 21 of file GLSelectionistStandard.h.

virtual GLSelectionistStandard::~GLSelectionistStandard (  )  [inline, virtual]

Destructor. Destroys everything.

Definition at line 27 of file GLSelectionistStandard.h.


Member Function Documentation

int GLSelectionistStandard::doSelection ( const vector< GLBaseOrganism * > &  current_population,
const vector< GLBaseOrganism * > &  candidates,
size_t  new_size,
vector< GLBaseOrganism * > &  to_live,
vector< GLBaseOrganism * > &  to_die,
vector< const GLBaseOrganism * > &  best_survived 
) [virtual]

Choose which organism to leave and which one to die in the next generation. It is assumed, that all organisms passed as input parameters were evaluated already.

Parameters:
current_population organisms from the this generation's population.
new_generation newly created organisms (e.g. mutants and/or children). It is desirable, that both arrays have not common organisms.
new_size size of the next generation.
to_live output array of organisms to live (will be cleaned).
to_die output array of organisms to die in the next generation (will be cleaned).
best_survived best survived organism(s). May be single organism for single objective optimisation or the whole Pareto-front for multi-objective optimisation. The previous content of this array will be lost.
Returns:
number of NEW organisms (not present in current generation) in next generation.
Choose which organism to leave and which one to die in the next generation. It is assumed, that all organisms passed as input parameters were evaluated already.
Parameters:
current_population organisms from the this generation's population.
candidates newly created organisms (e.g. mutants and/or children). It is desirable, that both arrays have not common organisms.
new_size size of the next generation.
to_live output array of organisms to live (will be cleaned).
to_die output array of organisms to die in the next generation (will be cleaned).
best_survived best survived organism(s). May be single organism for single objective optimisation or the whole Pareto-front for multi-objective optimisation. The previous content of this array will be lost.
Returns:
number of NEW organisms (not present in current generation) in next generation.

Implements GLBaseSelectionist.

Definition at line 27 of file GLSelectionistStandard.cpp.


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

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