GaSelectTorunament
selection is similar to GaSelectRouletteWheel selection. For one place in result set it performs multiple roulette wheel selection before it chooses only one chromosome with best fitness value among selected. This increases probability of selection of chromosome with better fitness value. This selection use GaSelectTorunamentParams class for parameters.
More...
#include <D:/Temp/vs/gal/source/SelectionOperations.h>
Inherits Population::SelectionOperations::GaSelectRouletteWheel.
Public Member Functions | |
virtual GAL_API void GACALL | operator() (const GaPopulation &population, const GaSelectionParams ¶meters, GaSelectionResultSet &result) const |
More details are given in specification of GaSelectionOperation::operator () method. | |
virtual GaParameters *GACALL | MakeParameters () const |
More details are given in specification of GaOperation::MakeParameters method. | |
virtual bool GACALL | CheckParameters (const GaParameters ¶meters) const |
Valid parameters must have selection size and number of selections grater then 0. |
GaSelectTorunament
selection is similar to GaSelectRouletteWheel selection. For one place in result set it performs multiple roulette wheel selection before it chooses only one chromosome with best fitness value among selected. This increases probability of selection of chromosome with better fitness value. This selection use GaSelectTorunamentParams class for parameters.
This class has no built-in synchronizator, so LOCK_OBJECT
and LOCK_THIS_OBJECT
macros cannot be used with instances of this class. Because this genetic operation is stateless all public method are thread-safe.
void Population::SelectionOperations::GaSelectTournament::operator() | ( | const GaPopulation & | population, | |
const GaSelectionParams & | parameters, | |||
GaSelectionResultSet & | result | |||
) | const [virtual] |
More details are given in specification of GaSelectionOperation::operator () method.
This method is thread-safe.
Reimplemented from Population::SelectionOperations::GaSelectRouletteWheel.
virtual GaParameters* GACALL Population::SelectionOperations::GaSelectTournament::MakeParameters | ( | ) | const [inline, virtual] |
More details are given in specification of GaOperation::MakeParameters method.
This method is thread-safe.
Reimplemented from Population::SelectionOperations::GaSelectRouletteWheel.
virtual bool GACALL Population::SelectionOperations::GaSelectTournament::CheckParameters | ( | const GaParameters & | parameters | ) | const [inline, virtual] |
Valid parameters must have selection size and number of selections grater then 0.
More details are given in specification of GaOperation::CheckParameters method.
This method is thread-safe.
Reimplemented from Population::SelectionOperations::GaSelectRouletteWheel.