GaGenerationCriteriaParams class is used by GaGenerationCriteria class as parameters for the criteria. It contains number of generation after which execution of algorithm should be stopped.
More...
#include <source/StopCriterias.h>
Inherits Algorithm::GaStopCriteriaParams.
Public Member Functions | |
| GaGenerationCriteriaParams (int numberOfGeneration) | |
| This constructor initializes parameters with user-defined number of generations. | |
| GaGenerationCriteriaParams () | |
| This constructor initializes parameters with default values. Default number of generations is 1000. | |
| virtual GaParameters *GACALL | Clone () const |
| More details are given in specification of GaParameters::Clone method. | |
| int GACALL | GetNumberOfGeneration () const |
| This method is not thread-safe. | |
| void GACALL | SetNumberOfGeneration (int number) |
SetNumberOfGeneration method sets number of generations after which algorithm should stops its execution. | |
Private Attributes | |
| int | _numberOfGenerations |
| Number of generations after which algorithm should stops its execution. | |
GaGenerationCriteriaParams class is used by GaGenerationCriteria class as parameters for the criteria. It contains number of generation after which execution of algorithm should be stopped.
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::StopCriterias::GaGenerationCriteriaParams::GaGenerationCriteriaParams | ( | int | numberOfGeneration | ) | [inline] |
This constructor initializes parameters with user-defined number of generations.
| numberOfGeneration | number of generations after which algorithm should stops its execution. |
| Algorithm::StopCriterias::GaGenerationCriteriaParams::GaGenerationCriteriaParams | ( | ) | [inline] |
This constructor initializes parameters with default values. Default number of generations is 1000.
| virtual GaParameters* GACALL Algorithm::StopCriterias::GaGenerationCriteriaParams::Clone | ( | ) | const [inline, virtual] |
More details are given in specification of GaParameters::Clone method.
Implements Common::GaParameters.
| int GACALL Algorithm::StopCriterias::GaGenerationCriteriaParams::GetNumberOfGeneration | ( | ) | const [inline] |
This method is not thread-safe.
| void GACALL Algorithm::StopCriterias::GaGenerationCriteriaParams::SetNumberOfGeneration | ( | int | number | ) | [inline] |
SetNumberOfGeneration method sets number of generations after which algorithm should stops its execution.
This method is not thread-safe.
| number | number of generations. |
Number of generations after which algorithm should stops its execution.