39 GADefineIdentity(
"GAIncrementalGA", GAID::IncrementalGA);
43 enum ReplacementScheme {
44 RANDOM = GAPopulation::RANDOM,
45 BEST = GAPopulation::BEST,
46 WORST = GAPopulation::WORST,
66 int setptr(
const std::string &name,
const void* value)
override;
67 int get(
const char* name,
void* value)
const override;
69 void objectiveFunction(GAGenome::Evaluator f)
override;
70 void objectiveData(
const GAEvalData& v)
override;
72 int nOffspring()
const {
return noffspr;}
73 int nOffspring(
unsigned int);
75 ReplacementScheme replacement()
const {
return rs;}
76 ReplacementScheme replacement(ReplacementScheme, ReplacementFunction f=
nullptr);
81 ReplacementFunction rf;
87 inline std::ostream & operator<< (std::ostream & os,
GAIncrementalGA & arg)
88 { arg.write(os);
return(os); }
89 inline std::istream & operator>> (std::istream & is,
GAIncrementalGA & arg)
90 { arg.read(is);
return(is); }
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
void step() override
Evolve by one generation.
void initialize(unsigned int seed=0) override
Undefined for the base class.
Parameter List.
Definition: GAParameter.h:83
Definition: GAPopulation.h:66