#include <D:/Temp/vs/gal/source/ReplacementOperations.h>
Inherits Population::GaReplacementParams.
Public Member Functions | |
GaReplaceElitismParams (int replacementSize, int elitism) | |
This constructor initializes parameters with user defined values. | |
GaReplaceElitismParams () | |
This constructor initializes parameters with default values. Default number of replaced chromosomes is 2, and default elitism size is 0. | |
virtual GaParameters *GACALL | Clone () const |
More details are given in specification of GaParameters::Clone method. | |
int GACALL | GetElitism () const |
This method is not thread-safe. | |
void GACALL | SetElitism (int elitism) |
SetElitism method sets number of the best chromosomes that will not be removed from population by replacement operation. | |
Private Attributes | |
int | _elitism |
Number of best chromosomes that will not be removed from population by replacement operation. |
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.
Population::ReplacementOperations::GaReplaceElitismParams::GaReplaceElitismParams | ( | int | replacementSize, | |
int | elitism | |||
) | [inline] |
This constructor initializes parameters with user defined values.
replacementSize | number of chromosomes which replaced by the operation. | |
elitism | number of the best chromosomes that will not be removed from population by replacement operation. |
Population::ReplacementOperations::GaReplaceElitismParams::GaReplaceElitismParams | ( | ) | [inline] |
This constructor initializes parameters with default values. Default number of replaced chromosomes is 2, and default elitism size is 0.
virtual GaParameters* GACALL Population::ReplacementOperations::GaReplaceElitismParams::Clone | ( | ) | const [inline, virtual] |
More details are given in specification of GaParameters::Clone method.
This method is not thread-safe.
Reimplemented from Population::GaReplacementParams.
int GACALL Population::ReplacementOperations::GaReplaceElitismParams::GetElitism | ( | ) | const [inline] |
This method is not thread-safe.
void GACALL Population::ReplacementOperations::GaReplaceElitismParams::SetElitism | ( | int | elitism | ) | [inline] |
SetElitism
method sets number of the best chromosomes that will not be removed from population by replacement operation.
This method is not thread-safe.
elitism | number of the best chromosomes that will not be removed. |
Number of best chromosomes that will not be removed from population by replacement operation.