#include <GLSelectionistStandard.h>
Public Member Functions | |
GLSelectionistStandard (GLBaseRanker *ranker) | |
virtual | ~GLSelectionistStandard () |
virtual int | doSelection (const vector< GLBaseOrganism * > ¤t_population, const vector< GLBaseOrganism * > &new_generation, size_t new_size, vector< GLBaseOrganism * > &to_live, vector< GLBaseOrganism * > &to_die, vector< const GLBaseOrganism * > &best_survived) |
Definition at line 11 of file GLSelectionistStandard.h.
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.
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.
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.
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. |
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. |
Implements GLBaseSelectionist.
Definition at line 27 of file GLSelectionistStandard.cpp.