ECF 1.5
|
State class - backbone of the framework. More...
#include <State.h>
Public Member Functions | |
State () | |
Construct the one and only State object. More... | |
bool | initialize (int, char **) |
Initialize the whole system. More... | |
bool | run () |
Driver of the evolution process - serial version. More... | |
FitnessP | getFitnessObject () |
get one initial Fitness object (create on demand) More... | |
RandomizerP | getRandomizer () |
get current Randomizer More... | |
void | setRandomizer (RandomizerP randomizer) |
set Randomizer to be used More... | |
RegistryP | getRegistry () |
get access to parameter repository More... | |
LoggerP | getLogger () |
get Logger More... | |
StatCalcP | getStats () |
get population statistics More... | |
HallOfFameP | getHoF () |
get population hall of fame More... | |
CommunicatorP | getCommunicator () |
access current process communicator mechanism More... | |
uint | getGenerationNo () |
get current generation number More... | |
uint | getElapsedTime () |
get elapsed time (in seconds) More... | |
bool | getBatchMode () |
get batch mode info (yes or no) More... | |
void | setTerminateCond () |
set termination condition (evolution ends with current generation) More... | |
uint | increaseEvaluations (uint nEval=1) |
increase and return number of evaluations (local deme) More... | |
uint | getEvaluations () |
get number of evaluations (global population) More... | |
bool | getTerminateCond () |
is termination condition set More... | |
EvolutionContextP | getContext () |
get evolutionary context More... | |
IndividualP | getIndividualObject () |
get one initial Individual object More... | |
std::vector< GenotypeP > | getGenotypes () |
access all active (currently used) genotypes More... | |
PopulationP | getPopulation () |
get Population More... | |
AlgorithmP | getAlgorithm () |
access current active Algorithm More... | |
EvaluateOpP | getEvalOp () |
access evaluation operator More... | |
bool | isImplicitParallel () |
Is the algorithm executed implicitly parallel. More... | |
bool | isAlgorithmParallel () |
Is current algorithm parallel. More... | |
uint | setGenotype (GenotypeP) |
Set a genotype to be used in individuals. More... | |
void | setAlgorithm (AlgorithmP) |
Set the desired algorithm (overrides the current choice) More... | |
void | setEvalOp (EvaluateOpP) |
Set user defined evaluation operator. More... | |
void | setEvalOp (EvaluateOp *) |
Set user defined evaluation operator (without a smart pointer). More... | |
bool | 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. More... | |
bool | 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. More... | |
bool | addOperator (OperatorP op) |
Add user-defined operator. (Its parameters can now be specified and used in config file.) Must be called before State::initialize. More... | |
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.
State::State | ( | ) |
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.
gen | new algorithm |
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.
gen | new genotype |
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.
gen | new operator |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
FitnessP State::getFitnessObject | ( | ) |
|
inline |
|
inline |
|
inline |
|
inline |
get one initial Individual object
|
inline |
get Population
|
inline |
get current Randomizer
|
inline |
|
inline |
|
inline |
|
inline |
bool State::initialize | ( | int | argc, |
char ** | argv | ||
) |
bool State::isAlgorithmParallel | ( | ) |
bool State::isImplicitParallel | ( | ) |
bool State::run | ( | ) |
void State::setAlgorithm | ( | AlgorithmP | algorithm | ) |
void State::setEvalOp | ( | EvaluateOp * | eval | ) |
Set user defined evaluation operator (without a smart pointer).
Evaluation operator must be created and set before the call to State::initialize
void State::setEvalOp | ( | EvaluateOpP | eval | ) |
Set user defined evaluation operator.
Evaluation operator must be created and set before the call to State::initialize
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 as active). Each genotype is given a unique index.
genotype | new genotype to be included in each individual |
|
inline |
set Randomizer to be used
|
inline |