#include <source/PopulationOperations.h>
Inherits Common::GaParameters.
Inherited by Population::ReplacementOperations::GaReplaceElitismParams.
Public Member Functions | |
| GaReplacementParams (int replacementSize) | |
| This constructor initializes replacement parameters with user-defined replacement size. | |
| GaReplacementParams () | |
| This constructor initializes replacement parameters with default values. Default replacement size is 2. | |
| virtual GaParameters *GACALL | Clone () const |
| More details are given in specification of GaParameters::Clone method. | |
| int GACALL | GetReplacementSize () const |
| This method is not thread-safe. | |
| void GACALL | SetReplacementSize (int size) |
SetReplacementSize method sets number of chromosomes which should be replaced. | |
Protected Attributes | |
| int | _replacemetSize |
| Number of chromosomes which should be replaced. | |
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::GaReplacementParams::GaReplacementParams | ( | int | replacementSize | ) | [inline] |
This constructor initializes replacement parameters with user-defined replacement size.
| replacementSize | number of chromosomes which should be replaced. |
| Population::GaReplacementParams::GaReplacementParams | ( | ) | [inline] |
This constructor initializes replacement parameters with default values. Default replacement size is 2.
| virtual GaParameters* GACALL Population::GaReplacementParams::Clone | ( | ) | const [inline, virtual] |
More details are given in specification of GaParameters::Clone method.
Implements Common::GaParameters.
Reimplemented in Population::ReplacementOperations::GaReplaceElitismParams.
| int GACALL Population::GaReplacementParams::GetReplacementSize | ( | ) | const [inline] |
This method is not thread-safe.
| void GACALL Population::GaReplacementParams::SetReplacementSize | ( | int | size | ) | [inline] |
SetReplacementSize method sets number of chromosomes which should be replaced.
This method is not thread-safe.
| size | new number of chromosomes for replacement. |
int Population::GaReplacementParams::_replacemetSize [protected] |
Number of chromosomes which should be replaced.