State class - backbone of the framework.
More...
#include <State.h>
List of all members.
Detailed Description
State class - backbone of the framework.
State class handles user communication, component repository and evolution process. State is also the entry point for access to system parameters and functionality. There is only one State object.
Definition at line 35 of file State.h.
Constructor & Destructor Documentation
Construct the one and only State object.
Also register all known algorithms, genotypes and termination operators, create the population and some other elements of the system.
Definition at line 12 of file State.cpp.
Member Function Documentation
| bool State::addAlgorithm |
( |
AlgorithmP |
alg |
) |
|
Add user-defined or user customized algorithm. (It can then be specified and used in config file.) Replaces the existing algorithm with the same name (if there is one). Must be called before State::initialize.
- Parameters:
-
Definition at line 720 of file State.cpp.
| bool State::addGenotype |
( |
GenotypeP |
gen |
) |
|
Add user-defined or user customized genotype. (The genotype can then be specified and used in config file.) Replaces the existing genotype with the same name (if there is one). Must be called before State::initialize.
- Parameters:
-
Definition at line 705 of file State.cpp.
| bool State::addOperator |
( |
OperatorP |
op |
) |
|
Add user-defined operator. (Its parameters can now be specified and used in config file.) Must be called before State::initialize.
- Parameters:
-
Definition at line 733 of file State.cpp.
| AlgorithmP State::getAlgorithm |
( |
|
) |
[inline] |
access current active algorithm
Definition at line 208 of file State.h.
| bool State::getBatchMode |
( |
|
) |
[inline] |
get batch mode info (yes or no)
Definition at line 169 of file State.h.
| CommunicatorP State::getCommunicator |
( |
|
) |
[inline] |
access current process communicator mechanism
Definition at line 151 of file State.h.
| uint State::getElapsedTime |
( |
|
) |
[inline] |
get elapsed time (in seconds)
Definition at line 163 of file State.h.
| FitnessP State::getFitnessObject |
( |
|
) |
[inline] |
get one initial fitness object
Definition at line 187 of file State.h.
| uint State::getGenerationNo |
( |
|
) |
[inline] |
get current generation number
Definition at line 157 of file State.h.
| std::vector<GenotypeP> State::getGenotypes |
( |
|
) |
[inline] |
access all currently used genotypes
Definition at line 199 of file State.h.
| HallOfFameP State::getHoF |
( |
|
) |
[inline] |
get population hall of fame
Definition at line 145 of file State.h.
| IndividualP State::getIndividualObject |
( |
|
) |
[inline] |
get one initial individual object
Definition at line 193 of file State.h.
| RandomizerP State::getRandomizer |
( |
|
) |
[inline] |
get current randomizer
Definition at line 118 of file State.h.
| RegistryP State::getRegistry |
( |
|
) |
[inline] |
get access to parameter repository
Definition at line 130 of file State.h.
| StatCalcP State::getStats |
( |
|
) |
[inline] |
get population statistics
Definition at line 139 of file State.h.
| bool State::getTerminateCond |
( |
|
) |
[inline] |
is termination condition set
Definition at line 181 of file State.h.
| bool State::initialize |
( |
int |
argc, |
|
|
char ** |
argv | |
|
) |
| | |
Initialize the whole system.
Initialization steps:
- parse command line arguments
- register parameters of framework components
- parse config file
- initialize all components. Called by: main
Definition at line 483 of file State.cpp.
Driver of the evolution process - serial version.
Driver of the evolution process - parallel version.
Runs the designated algorithm. Called by: main()
Definition at line 752 of file State.cpp.
| void State::setEvalOp |
( |
EvaluateOpP |
eval |
) |
|
Set user defined evaluation operator.
Evaluation operator must be created and set before the call to State::initialize
Definition at line 685 of file State.cpp.
| uint State::setGenotype |
( |
GenotypeP |
genotype |
) |
|
Set a genotype to be used in individuals.
This actually adds new gentoype to be used in individuals (doesn't replace the ones already defined). Each genotype is given a unique index.
- Parameters:
-
| genotype | new genotype to be included in each individual |
- Returns:
- new genotype's index
Definition at line 646 of file State.cpp.
| void State::setRandomizer |
( |
RandomizerP |
randomizer |
) |
[inline] |
set randomizer to be used
Definition at line 124 of file State.h.
| void State::setTerminateCond |
( |
|
) |
[inline] |
set termination condition (evolution ends with current generation)
Definition at line 175 of file State.h.
The documentation for this class was generated from the following files:
- D:/Radagast_D/Projekt/ECF_trunk/ECF/State.h
- D:/Radagast_D/Projekt/ECF_trunk/ECF/State.cpp