Population::GaSelectionParams Class Reference

This class is base for parameters of selection operation. More...

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

Inherits Common::GaParameters.

Inherited by Population::SelectionOperations::GaSelectDuplicatesParams.

List of all members.

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.


Detailed Description

This class is base for parameters of selection operation.

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::GaSelectionParams::GaSelectionParams ( int  selectionSize  )  [inline]

This constructor initializes selection parameters with user-defined replacement size.

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


Member Function Documentation

virtual GaParameters* GACALL Population::GaSelectionParams::Clone (  )  const [inline, virtual]

int GACALL Population::GaSelectionParams::GetSelectionSize (  )  const [inline]

This method is not thread-safe.

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

void GACALL Population::GaSelectionParams::SetSelectionSize ( int  size  )  [inline]

SetSelectionSize method sets number of chromosomes which should be selected.

This method is not thread-safe.

Parameters:
size new number of chromosomes for selection.


Member Data Documentation

Number of chromosomes which should be selected.


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

Genetic Algorithm Library
Coolsoft Software Development