14 # include "GA/ga_engine_exception.h"
15 # include "GA/population.h"
16 # include "GA/a_observer.h"
160 unsigned int Evolve(
bool report);
165 unsigned int _report_interval;
166 unsigned int _nb_threads;
167 double _expected_fitness;
void setNumberOfThreads(unsigned int nb)
Set the number of threads used to evaluate the population.
Definition: ga_engine.cc:100
void setExpectedFitness(double fitness)
Set the expected fitness.
Definition: ga_engine.cc:95
void CreatePopulation(GAConfig const &config, unsigned int size)
Create a new population in terms of the configuration.
Definition: ga_engine.cc:165
GA::GAConfig::FEvaluate getEvaluation(void) const
Get the evaluation function pointer.
Definition: ga_engine.cc:62
Define what is a population for the GAEngine.
Definition: population.h:26
Contains the objects that define the GAEngine.
GAEngine(void)
Constructor.
Definition: ga_engine.cc:21
void setMaxEpochs(int max)
Set the maximum epochs.
Definition: ga_engine.cc:90
Manage the evolution of a population composed of IDNA objects.
Definition: ga_engine.h:24
unsigned int getReportInterval(void) const
Get the interval between each report.
Definition: ga_engine.cc:72
double getSelectionRate(void) const
Get the selection rate member.
Definition: ga_engine.cc:52
Population const & getPopulation(void) const
Get the GA::Population member.
Definition: ga_engine.cc:37
Define the configuration of the GAEngine.
Definition: ga_config.h:24
double getExpectedFitness(void) const
Get the expected fitness member.
Definition: ga_engine.cc:82
void setSelectionRate(double rate)
Set the selection rate.
Definition: ga_engine.cc:124
unsigned int getPoolSize(void) const
Get the pool size member.
Definition: ga_engine.cc:57
void setReportInterval(unsigned int nb)
Set the interval between each report.
Definition: ga_engine.cc:105
unsigned int Evolve(bool report)
Run the evolution of the population.
Definition: ga_engine.cc:185
void setMutationRate(double rate)
Set the mutation rate.
Definition: ga_engine.cc:112
Define the abstract class that allow to be an observer.
Definition: a_observer.h:20
unsigned int getNumberOfThread(void) const
Get the number of threads used to evaluate the population.
Definition: ga_engine.cc:77
int getMaxEpochs(void) const
Get the maximum epochs member.
Definition: ga_engine.cc:67
void(* FEvaluate)(std::list< IDNA * > &)
Function pointer to evaluate the population.
Definition: ga_config.h:34
double getMutationRate(void) const
Get the mutation rate member.
Definition: ga_engine.cc:47
~GAEngine(void)
Destructor.
Definition: ga_engine.cc:30
void setPoolSize(unsigned int size)
Set the pool size for the tournament.
Definition: ga_engine.cc:136