#include <source/PopulationOperations.h>
Inherits Common::GaOperation.
Inherited by Population::SelectionOperations::GaSelectBest, Population::SelectionOperations::GaSelectRandom, Population::SelectionOperations::GaSelectRouletteWheel, and Population::SelectionOperations::GaSelectWorst.
Public Member Functions | |
| virtual void GACALL | operator() (const GaPopulation &population, const GaSelectionParams ¶meters, GaSelectionResultSet &result) const =0 |
operator () performs replacement operation. | |
| virtual GaSelectionResultSet *GACALL | MakeResultSet (GaPopulation *population, const GaSelectionParams ¶meters) const |
MakeResultSet method makes result set used by selection operation for storing chromosomes indices. Caller is responsible for memory allocated by this method for result set object. | |
This class has no built-in synchronizator, so LOCK_OBJECT and LOCK_THIS_OBJECT macros cannot be used with instances of this class. No public or private methods are thread-safe.
| virtual void GACALL Population::GaSelectionOperation::operator() | ( | const GaPopulation & | population, | |
| const GaSelectionParams & | parameters, | |||
| GaSelectionResultSet & | result | |||
| ) | const [pure virtual] |
operator () performs replacement operation.
| population | reference to population from which chromosomes are selected. | |
| parameters | reference to parameters of selection operation. | |
| result | pointer to result set which is used to store selected chromosomes. |
Implemented in Population::SelectionOperations::GaSelectBest, Population::SelectionOperations::GaSelectRandom, Population::SelectionOperations::GaSelectRandomBest, Population::SelectionOperations::GaSelectRouletteWheel, Population::SelectionOperations::GaSelectTournament, and Population::SelectionOperations::GaSelectWorst.
| virtual GaSelectionResultSet* GACALL Population::GaSelectionOperation::MakeResultSet | ( | GaPopulation * | population, | |
| const GaSelectionParams & | parameters | |||
| ) | const [inline, virtual] |
MakeResultSet method makes result set used by selection operation for storing chromosomes indices. Caller is responsible for memory allocated by this method for result set object.
This method is thread-safe.
| population | pointer to population to which result set is bound. | |
| parameters | reference to parameters of selection operation. |