27 GADefineIdentity(
"GADemeGA", GAID::DemeGA);
45 virtual void migrate();
52 int setptr(
const std::string &name,
const void *value)
override;
53 int get(
const char *name,
void *value)
const override;
55 int minimaxi()
const override {
return minmax; }
56 int minimaxi(
int m)
override;
58 const GAPopulation &population()
const override {
return *pop; }
61 GAGeneticAlgorithm::population(p);
62 return population(ALL, p);
64 int populationSize()
const override {
return pop->size(); }
65 int populationSize(
unsigned int n)
override
67 GAGeneticAlgorithm::populationSize(n);
68 return populationSize(ALL, n);
73 GAGeneticAlgorithm::scaling(s);
74 return scaling(ALL, s);
79 GAGeneticAlgorithm::selector(s);
80 return selector(ALL, s);
82 void objectiveFunction(GAGenome::Evaluator f)
override
84 GAGeneticAlgorithm::objectiveFunction(f);
85 objectiveFunction(ALL, f);
87 void objectiveData(
const GAEvalData &v)
override
89 GAGeneticAlgorithm::objectiveData(v);
90 objectiveData(ALL, v);
93 const GAPopulation &population(
unsigned int i)
const {
return *deme[i]; }
95 int populationSize(
unsigned int i)
const {
return deme[i]->size(); }
96 int populationSize(
int i,
unsigned int n);
97 int nReplacement(
unsigned int i)
const {
return nrepl[i]; }
98 int nReplacement(
int i,
unsigned int n);
99 int nMigration()
const {
return nmig; }
100 int nMigration(
unsigned int i);
101 int nPopulations()
const {
return npop; }
102 int nPopulations(
unsigned int i);
106 return deme[i]->scaling();
111 return deme[i]->selector();
114 void objectiveFunction(
int i, GAGenome::Evaluator f);
115 void objectiveData(
int i,
const GAEvalData &);
117 const GAStatistics &statistics()
const {
return stats; }
118 const GAStatistics &statistics(
unsigned int i)
const {
return pstats[i]; }
129 inline std::ostream &operator<<(std::ostream &os,
GADemeGA &arg)
134 inline std::istream &operator>>(std::istream &is,
GADemeGA &arg)
Definition: GADemeGA.h:25
void step() override
Evolve by one generation.
void initialize(unsigned int seed=0) override
Undefined for the base class.
This is the basic interface for the object that contains evaluation data.
Definition: GAEvalData.h:15
The base GA class is virtual - it defines the core data elements and parts of the interface that are ...
Definition: GABaseGA.h:89
The base genome class just defines the genome interface - how to mutate, crossover,...
Definition: GAGenome.h:200
Parameter List.
Definition: GAParameter.h:83
Definition: GAPopulation.h:66
Definition: GAScaling.h:46
Definition: GASelector.h:55
Statistics class.
Definition: GAStatistics.h:30