Vita
evolution_recombination.h
Go to the documentation of this file.
1
13#if !defined(VITA_EVOLUTION_RECOMBINATION_H)
14#define VITA_EVOLUTION_RECOMBINATION_H
15
17#include "kernel/population.h"
18#include "kernel/vitafwd.h"
19
20namespace vita::recombination
21{
22
46template<class T>
48{
49public:
50 using offspring_t = small_vector<T, 1>;
51 using parents_t = typename selection::strategy<T>::parents_t;
52
54
55protected:
56 const population<T> &pop_;
57 evaluator<T> &eva_;
58 summary<T> *stats_;
59};
60
68template<class T>
69class base : public strategy<T>
70{
71public:
72 using base::strategy::strategy;
73
74 typename strategy<T>::offspring_t run(
75 const typename strategy<T>::parents_t &);
76};
77
81template<class T>
82class de : public strategy<T>
83{
84public:
85 using de::strategy::strategy;
86
87 typename strategy<T>::offspring_t run(
88 const typename strategy<T>::parents_t &);
89};
90
91#include "kernel/evolution_recombination.tcc"
92
93} // namespace vita::recombination
94
95#endif // include guard
Calculates the fitness of an individual.
Definition: evaluator.h:54
A group of individuals which may interact together (for example by mating) producing offspring.
Definition: population.h:37
This class defines the program skeleton of a standard genetic programming crossover plus mutation ope...
This is based on the differential evolution four members crossover.
The operation strategy (crossover, recombination, mutation...) adopted in the evolution class.
A summary of evolution (results, statistics...).