#include <source/MultithreadingAlgorithm.h>
Inherits Algorithm::GaAlgorithmParams.
Inherited by Algorithm::SimpleAlgorithms::GaSimpleAlgorithmParams.
Public Member Functions | |
| GaMultithreadingAlgorithmParams (int numberOfWorkers) | |
| This constructor initializes parameters for user-defined number of working threads. | |
| GaMultithreadingAlgorithmParams () | |
| Default number of working threads is 1. | |
| virtual GaParameters *GACALL | Clone () const |
| More details are given in specification of GaParameters::Clone method. | |
| int GACALL | GetNumberOfWorkers () const |
| This method is not thread-safe. | |
| void GACALL | SetNumberOfWorkers (int workers) |
SetNumberOfWorkers method sets number of working threads which should be used by genetic algorithm. | |
Private Attributes | |
| int | _numberOfWorkers |
| Number of working threads which should be used by genetic algorithm. | |
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::GaMultithreadingAlgorithmParams::GaMultithreadingAlgorithmParams | ( | int | numberOfWorkers | ) | [inline] |
This constructor initializes parameters for user-defined number of working threads.
| numberOfWorkers | number of working threads. |
| Algorithm::GaMultithreadingAlgorithmParams::GaMultithreadingAlgorithmParams | ( | ) | [inline] |
Default number of working threads is 1.
| virtual GaParameters* GACALL Algorithm::GaMultithreadingAlgorithmParams::Clone | ( | ) | const [inline, virtual] |
More details are given in specification of GaParameters::Clone method.
This method is not thread-safe.
Implements Common::GaParameters.
Reimplemented in Algorithm::SimpleAlgorithms::GaSimpleAlgorithmParams.
| int GACALL Algorithm::GaMultithreadingAlgorithmParams::GetNumberOfWorkers | ( | ) | const [inline] |
This method is not thread-safe.
| void GACALL Algorithm::GaMultithreadingAlgorithmParams::SetNumberOfWorkers | ( | int | workers | ) | [inline] |
SetNumberOfWorkers method sets number of working threads which should be used by genetic algorithm.
This method is not thread-safe.
| workers | number of working threads. |
Number of working threads which should be used by genetic algorithm.