Algorithm::SimpleAlgorithms::GaSimpleAlgorithmParams Class Reference

This class is used by GaSimpleAlgorithm as parameters. More...

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

Inherits Algorithm::GaMultithreadingAlgorithmParams.

List of all members.

Public Member Functions

 GaSimpleAlgorithmParams (int elitism, int numberOfWorkers)
 This constructor initializes parameters with user-defined elitism and number of workers.
 GaSimpleAlgorithmParams ()
 This constructor initializes parameters default values. Default number of working threads is 1 and elitism size is 0.
virtual GaParameters *GACALL Clone () const
 More details are given in specification of GaParameters::Clone method.
int GACALL GetElitism () const
 This method is not thread-safe.
void GACALL SetElitism (int elitism)
 SetElitism method sets number of best chromosomes in current generation which survives to the next.

Private Attributes

int _elitism
 Number of best chromosomes in current generation which survives to the next.


Detailed Description

This class is used by GaSimpleAlgorithm as parameters.

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

Algorithm::SimpleAlgorithms::GaSimpleAlgorithmParams::GaSimpleAlgorithmParams ( int  elitism,
int  numberOfWorkers 
) [inline]

This constructor initializes parameters with user-defined elitism and number of workers.

Parameters:
elitism number of best chromosomes in current generation which survives to the next.
numberOfWorkers number of working threads.

Algorithm::SimpleAlgorithms::GaSimpleAlgorithmParams::GaSimpleAlgorithmParams (  )  [inline]

This constructor initializes parameters default values. Default number of working threads is 1 and elitism size is 0.


Member Function Documentation

virtual GaParameters* GACALL Algorithm::SimpleAlgorithms::GaSimpleAlgorithmParams::Clone (  )  const [inline, virtual]

More details are given in specification of GaParameters::Clone method.

This method is not thread-safe.

Reimplemented from Algorithm::GaMultithreadingAlgorithmParams.

int GACALL Algorithm::SimpleAlgorithms::GaSimpleAlgorithmParams::GetElitism (  )  const [inline]

This method is not thread-safe.

Returns:
Method returns number of best chromosomes in current generation which survives to the next.

void GACALL Algorithm::SimpleAlgorithms::GaSimpleAlgorithmParams::SetElitism ( int  elitism  )  [inline]

SetElitism method sets number of best chromosomes in current generation which survives to the next.

This method is not-thread-safe.

Parameters:
elitism number of chromosomes.


Member Data Documentation

Number of best chromosomes in current generation which survives to the next.


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

Genetic Algorithm Library
Coolsoft Software Development