GaSelectTournament selection operations.
More...
#include <source/SelectionOperations.h>
Inherits Population::SelectionOperations::GaSelectDuplicatesParams.
Public Member Functions | |
| GaSelectTournamentParams (int selectionSize, bool duplicates, int numberOfSelections) | |
| This constructor initializes parameters with user defined values. | |
| GaSelectTournamentParams () | |
| This constructor initializes parameters with default values. Duplicates are not allowed, and selection size is 2 and number of roulette wheel selections is 1. | |
| virtual GaParameters *GACALL | Clone () const |
| More details are given in specification of GaParameters::Clone method. | |
| int GACALL | GetNumberOfSelections () const |
| This method is not thread-safe. | |
| void GACALL | SetNumberOfSelections (int number) |
SetNumberOfSelection method sets number of roulette wheel selections which are going to be executed before selection chooses one chromosome. | |
Private Attributes | |
| int | _numberOfSelections |
| Number of roulette wheel selections which are going to be executed before selection chooses one chromosome. | |
GaSelectTournament selection operations.
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::GaSelectTournamentParams::GaSelectTournamentParams | ( | int | selectionSize, | |
| bool | duplicates, | |||
| int | numberOfSelections | |||
| ) | [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. | |
| numberOfSelections | number of roulette wheel selections which are going to be executed before selection chooses one chromosome. |
| Population::SelectionOperations::GaSelectTournamentParams::GaSelectTournamentParams | ( | ) | [inline] |
This constructor initializes parameters with default values. Duplicates are not allowed, and selection size is 2 and number of roulette wheel selections is 1.
| virtual GaParameters* GACALL Population::SelectionOperations::GaSelectTournamentParams::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::GaSelectTournamentParams::GetNumberOfSelections | ( | ) | const [inline] |
This method is not thread-safe.
| void GACALL Population::SelectionOperations::GaSelectTournamentParams::SetNumberOfSelections | ( | int | number | ) | [inline] |
SetNumberOfSelection method sets number of roulette wheel selections which are going to be executed before selection chooses one chromosome.
This method is not thread-safe.
| number | number of roulette wheel selections. |
Number of roulette wheel selections which are going to be executed before selection chooses one chromosome.