#include <source/SelectionOperations.h>
Inherits Population::SelectionOperations::GaSelectDuplicatesParams.
Public Member Functions | |
| GaSelectRandomBestParams (int selectionSize, bool duplicates, int groupSize) | |
| This constructor initializes parameters with user defined values. | |
| GaSelectRandomBestParams () | |
| This constructor initializes parameters with default values. Duplicates are not allowed, selection size is 2, and group size is 4. | |
| virtual GaParameters *GACALL | Clone () const |
| More details are given in specification of GaParameters::Clone method. | |
| int GACALL | GetGroupSize () const |
| This method is not thread-safe. | |
| void GACALL | SetGroupSize (int size) |
SetGroupSize sets number of chromosomes which should be selected using random selection. | |
Private Attributes | |
| int | _groupSize |
| Number of chromosomes which should be selected using random selection. | |
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::SelectionOperations::GaSelectRandomBestParams::GaSelectRandomBestParams | ( | int | selectionSize, | |
| bool | duplicates, | |||
| int | groupSize | |||
| ) | [inline] |
This constructor initializes parameters with user defined values.
| selectionSize | number of chromosomes which should be selected. | |
| duplicates | if this parameter is set to true, duplicates of same chromosome in result set are allowed. If it is set to false duplicates are not allowed. | |
| groupSize | number of chromosomes which should be selected randomly. |
| Population::SelectionOperations::GaSelectRandomBestParams::GaSelectRandomBestParams | ( | ) | [inline] |
This constructor initializes parameters with default values. Duplicates are not allowed, selection size is 2, and group size is 4.
| virtual GaParameters* GACALL Population::SelectionOperations::GaSelectRandomBestParams::Clone | ( | ) | const [inline, virtual] |
More details are given in specification of GaParameters::Clone method.
This method is not thread-safe.
Reimplemented from Population::SelectionOperations::GaSelectDuplicatesParams.
| int GACALL Population::SelectionOperations::GaSelectRandomBestParams::GetGroupSize | ( | ) | const [inline] |
This method is not thread-safe.
| void GACALL Population::SelectionOperations::GaSelectRandomBestParams::SetGroupSize | ( | int | size | ) | [inline] |
SetGroupSize sets number of chromosomes which should be selected using random selection.
This method is not thread-safe.
| size | number of chromosomes which should be selected using random selection. |
Number of chromosomes which should be selected using random selection.