dignea  1.0.0
Diverse Instance Generator with Novelty Search and Evolutionary Algorithms
GenerationalGA.h
1 //
2 // Created by amarrero on 11/12/20.
3 //
4 
5 #ifndef DIGNEA_GENERATIONALGA_H
6 #define DIGNEA_GENERATIONALGA_H
7 
9 #include <dignea/core/Crossover.h>
10 #include <dignea/core/Mutation.h>
11 #include <dignea/core/Solution.h>
14 #include <dignea/utilities/random/PseudoRandom.h>
15 
22 template <class S>
23 class GenerationalGA : public AbstractGA<S> {
24  public:
26 
27  virtual ~GenerationalGA() = default;
33  string getName() const override { return "Generational Genetic Algorithm"; }
39  string getID() const override { return "GGA"; }
40 
41  protected:
42  void updateProgress() override;
43 };
44 
50 template <class S>
52  this->replacement = make_unique<EGenerational<S>>();
53 }
54 
60 template <class S>
62  this->performedEvaluations += this->populationSize;
63 }
64 
65 #endif // DIGNEA_GENERATIONALGA_H
Class to represent an Abstract Genetic Algorithm. Base skeleton is defined here, to extend in particu...
Definition: AbstractGA.h:38
unique_ptr< Replacement< S > > replacement
Definition: AbstractGA.h:101
Class to represents a Generation Genetic Algorithm (GGA). This algorithms differentiate from others b...
Definition: GenerationalGA.h:23
GenerationalGA()
Creates a RAW instance of a Generational GA algorithm.
Definition: GenerationalGA.h:51
string getName() const override
Get the Name.
Definition: GenerationalGA.h:33
string getID() const override
Get the ID of the algorithm.
Definition: GenerationalGA.h:39
void updateProgress() override
Updates the performed evaluations to the population size on each call.
Definition: GenerationalGA.h:61