#include <D:/Temp/vs/gal/source/PopulationOperations.h>
Inherits Common::GaOperation.
Inherited by Population::ScalingOperations::GaExponentialScaling, Population::ScalingOperations::GaLinearScaling, Population::ScalingOperations::GaNormalizationScaling, and Population::ScalingOperations::GaWindowScaling.
Public Member Functions | |
virtual float GACALL | operator() (const GaScaledChromosome &chromosome, const GaPopulation &population, const GaScalingParams ¶meters) const =0 |
operator () performs scaling operation and returns scaled fitness value. | |
virtual bool GACALL | IsRankingBased () const =0 |
IsRankingBased method should return true if scaling of fitness value is based on ranking of chromosome in population. | |
virtual bool GACALL | NeedRescaling (const GaPopulation &population, const GaScalingParams ¶meters) const =0 |
NeedRescaling method checks current population for consistence of chromosomes' scaled fitness values. |
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 float GACALL Population::GaScalingOperation::operator() | ( | const GaScaledChromosome & | chromosome, | |
const GaPopulation & | population, | |||
const GaScalingParams & | parameters | |||
) | const [pure virtual] |
operator ()
performs scaling operation and returns scaled fitness value.
chromosome | reference to chromosome which fitness is scaled. | |
population | reference to population which hosts specified chromosome. | |
parameters | reference to parameters of scaling operation. |
Implemented in Population::ScalingOperations::GaWindowScaling, Population::ScalingOperations::GaExponentialScaling, Population::ScalingOperations::GaLinearScaling, and Population::ScalingOperations::GaNormalizationScaling.
virtual bool GACALL Population::GaScalingOperation::IsRankingBased | ( | ) | const [pure virtual] |
IsRankingBased
method should return true
if scaling of fitness value is based on ranking of chromosome in population.
true
if scaling operation scales chromosome's fitness based on its ranking in population. If ranking is not used in scaling method should return false
.Implemented in Population::ScalingOperations::GaWindowScaling, Population::ScalingOperations::GaExponentialScaling, Population::ScalingOperations::GaLinearScaling, and Population::ScalingOperations::GaNormalizationScaling.
virtual bool GACALL Population::GaScalingOperation::NeedRescaling | ( | const GaPopulation & | population, | |
const GaScalingParams & | parameters | |||
) | const [pure virtual] |
NeedRescaling method checks current population for consistence of chromosomes' scaled fitness values.
population | reference to population which is checked. | |
parameters | reference to parameters of scaling operation. |
false
if all scaled fitness values of chromosomes are consistent. If rescaling of some or all chromosomes in population should be done, method returns true
.Implemented in Population::ScalingOperations::GaWindowScaling, Population::ScalingOperations::GaExponentialScaling, Population::ScalingOperations::GaLinearScaling, and Population::ScalingOperations::GaNormalizationScaling.