Population::SelectionOperations::GaSelectTournamentParams Class Reference

This class is used by GaSelectTournament selection operations. More...

#include <D:/Temp/vs/gal/source/SelectionOperations.h>

Inherits Population::SelectionOperations::GaSelectDuplicatesParams.

List of all members.

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.


Detailed Description

This class is used by 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.


Constructor & Destructor Documentation

Population::SelectionOperations::GaSelectTournamentParams::GaSelectTournamentParams ( int  selectionSize,
bool  duplicates,
int  numberOfSelections 
) [inline]

This constructor initializes parameters with user defined values.

Parameters:
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.


Member Function Documentation

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.

Returns:
Method returns number of roulette wheel selections which are going to be executed before selection chooses one chromosome.

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.

Parameters:
number number of roulette wheel selections.


Member Data Documentation

Number of roulette wheel selections which are going to be executed before selection chooses one chromosome.


The documentation for this class was generated from the following file:

Genetic Algorithm Library
Coolsoft Software Development