#include <D:/Temp/vs/gal/source/SimpleAlgorithm.h>
Inherits Algorithm::GaMultithreadingAlgorithmParams.
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. |
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.
Algorithm::SimpleAlgorithms::GaSimpleAlgorithmParams::GaSimpleAlgorithmParams | ( | int | elitism, | |
int | numberOfWorkers | |||
) | [inline] |
This constructor initializes parameters with user-defined elitism and number of workers.
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.
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.
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.
elitism | number of chromosomes. |
Number of best chromosomes in current generation which survives to the next.