#include <D:/Temp/vs/gal/source/PopulationOperations.h>
Inherits Common::GaParameters.
Inherited by Population::SelectionOperations::GaSelectDuplicatesParams.
Public Member Functions | |
GaSelectionParams (int selectionSize) | |
This constructor initializes selection parameters with user-defined replacement size. | |
GaSelectionParams () | |
This constructor initializes selection parameters with default values. Default selection size is 2. | |
virtual GaParameters *GACALL | Clone () const |
More details are given in specification of GaParameters::Clone method. | |
int GACALL | GetSelectionSize () const |
This method is not thread-safe. | |
void GACALL | SetSelectionSize (int size) |
SetSelectionSize method sets number of chromosomes which should be selected. | |
Protected Attributes | |
int | _selectionSize |
Number of chromosomes which should be selected. |
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::GaSelectionParams::GaSelectionParams | ( | int | selectionSize | ) | [inline] |
This constructor initializes selection parameters with user-defined replacement size.
selectionSize | number of chromosomes which should be selected. |
Population::GaSelectionParams::GaSelectionParams | ( | ) | [inline] |
This constructor initializes selection parameters with default values. Default selection size is 2.
virtual GaParameters* GACALL Population::GaSelectionParams::Clone | ( | ) | const [inline, virtual] |
More details are given in specification of GaParameters::Clone method.
Implements Common::GaParameters.
Reimplemented in Population::SelectionOperations::GaSelectDuplicatesParams, Population::SelectionOperations::GaSelectRandomBestParams, and Population::SelectionOperations::GaSelectTournamentParams.
int GACALL Population::GaSelectionParams::GetSelectionSize | ( | ) | const [inline] |
This method is not thread-safe.
void GACALL Population::GaSelectionParams::SetSelectionSize | ( | int | size | ) | [inline] |
SetSelectionSize
method sets number of chromosomes which should be selected.
This method is not thread-safe.
size | new number of chromosomes for selection. |
int Population::GaSelectionParams::_selectionSize [protected] |
Number of chromosomes which should be selected.