Population::SelectionOperations::GaSelectRandomBestParams Class Reference

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

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

Inherits Population::SelectionOperations::GaSelectDuplicatesParams.

List of all members.

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.


Detailed Description

This class is used by GaSelectRandomBest 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::GaSelectRandomBestParams::GaSelectRandomBestParams ( int  selectionSize,
bool  duplicates,
int  groupSize 
) [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.
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.


Member Function Documentation

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.

Returns:
Method returns number of chromosomes which should be selected using random selection.

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.

Parameters:
size number of chromosomes which should be selected using random selection.


Member Data Documentation

Number of chromosomes which should be selected using random selection.


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

Genetic Algorithm Library
Coolsoft Software Development