12 # define POPULATION_H_
17 # include "GA/ga_config.h"
18 # include "GA/population_exception.h"
71 unsigned int getSize(
void)
const throw();
106 std::list<IDNA *>
const&
get(void)
const throw();
111 std::list<IDNA *> &
get(void)
throw();
121 void setSize(
unsigned int size);
152 void Evaluate(
unsigned int nbThread);
170 unsigned int _pool_size;
171 double _mutation_rate;
172 double _selection_rate;
173 double _best_fitness;
176 std::list<IDNA *> _samples;
177 std::vector<IDNA *> _parents;
180 std::ostream& operator<<(std::ostream& flux,
Population const& p);
unsigned int getSize(void) const
Get the population size member.
Definition: population.cc:86
Population(void)
Constructor.
Definition: population.cc:24
void setConfig(GAConfig const &config)
Set the GAEngine's configuration.
Definition: population.cc:162
void Crossover(void)
Do te crossover of the population.
Definition: population.cc:289
Define what is a population for the GAEngine.
Definition: population.h:26
void Evaluate(unsigned int nbThread)
Evaluate the population.
Definition: population.cc:172
void setSelectionRate(double rate)
Set the selection rate.
Definition: population.cc:155
Contains the objects that define the GAEngine.
void Generate(void)
Generator the entire population.
Definition: population.cc:70
void setMutationRate(double rate)
Set the mutation rate.
Definition: population.cc:148
unsigned int getPoolSize(void) const
Get the pool size member.
Definition: population.cc:91
void Selection(void)
Do the selection of the population in order to generate the next population.
Definition: population.cc:247
Define the configuration of the GAEngine.
Definition: ga_config.h:24
double getBestFitness(void) const
Get the best fitness contained in the population.
Definition: population.cc:106
double getMutationRate(void) const
Get the mutation rate member.
Definition: population.cc:96
double getAverageFitness(void) const
Get the average fitness of the population.
Definition: population.cc:111
~Population(void)
Destructor.
Definition: population.cc:42
double getSelectionRate(void) const
Get the selection rate member.
Definition: population.cc:101
void setPoolSize(unsigned int size)
Set the pool size.
Definition: population.cc:141
void Mutation(void)
Do the mutation of the population.
Definition: population.cc:335
GAConfig const & getConfig(void) const
Get the configuration of the GAEngine.
Definition: population.cc:116
void setSize(unsigned int size)
Set the population size.
Definition: population.cc:134