18 GADefineIdentity(
"GASimpleGA", GAID::SimpleGA);
38 int setptr(
const std::string &name,
const void *value)
override;
39 int get(
const char *name,
void *value)
const override;
41 bool elitist()
const {
return el; }
42 bool elitist(
bool flag)
44 params.set(gaNelitism,
static_cast<int>(flag));
48 int minimaxi()
const override {
return minmax; }
49 int minimaxi(
int m)
override;
51 const GAPopulation &population()
const override {
return *pop; }
53 int populationSize()
const override {
return pop->size(); }
54 int populationSize(
unsigned int n)
override;
59 return GAGeneticAlgorithm::scaling(s);
65 return GAGeneticAlgorithm::selector(s);
67 void objectiveFunction(GAGenome::Evaluator f)
override;
68 void objectiveData(
const GAEvalData &v)
override;
75 inline std::ostream &operator<<(std::ostream &os,
GASimpleGA &arg)
81 inline std::istream &operator>>(std::istream &is,
GASimpleGA &arg)
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
Simple genetic algorithm class.
Definition: GASimpleGA.h:16
void step() override
Evolve by one generation.
void initialize(unsigned int seed=0) override
Undefined for the base class.