GaReplaceBest
replaces chromosomes with best fitness values in population. If population is sorted this operation can replace any number of chromosomes, if it is not sorted this operation can only replace chromosomes which are stored in the best chromosome sorted group of population. This replacement operation use GaReplacementParams class for parameters.
More...
#include <D:/Temp/vs/gal/source/ReplacementOperations.h>
Inherits Population::GaReplacementOperation.
Public Member Functions | |
virtual GAL_API void GACALL | operator() (GaPopulation &population, const GaReplacementParams ¶meters, const GaCouplingResultSet &newChromosomes) const |
More details are given in specification of GaReplacementOperation::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 number of chromosomes which should be replaced greater then 0. |
GaReplaceBest
replaces chromosomes with best fitness values in population. If population is sorted this operation can replace any number of chromosomes, if it is not sorted this operation can only replace chromosomes which are stored in the best chromosome sorted group of population. This replacement operation use GaReplacementParams 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::ReplacementOperations::GaReplaceBest::operator() | ( | GaPopulation & | population, | |
const GaReplacementParams & | parameters, | |||
const GaCouplingResultSet & | newChromosomes | |||
) | const [virtual] |
More details are given in specification of GaReplacementOperation::operator () method.
This method is thread-safe.
Implements Population::GaReplacementOperation.
virtual GaParameters* GACALL Population::ReplacementOperations::GaReplaceBest::MakeParameters | ( | ) | const [inline, virtual] |
More details are given in specification of GaOperation::MakeParameters method.
This method is thread-safe.
Implements Common::GaOperation.
virtual bool GACALL Population::ReplacementOperations::GaReplaceBest::CheckParameters | ( | const GaParameters & | parameters | ) | const [inline, virtual] |
Valid parameters must have number of chromosomes which should be replaced greater then 0.
More details are given in specification of GaOperation::CheckParameters method.
This method is thread-safe.
Implements Common::GaOperation.