|
- #ifndef GGA_H
- #define GGA_H
-
- #include <iostream>
-
- #include <vector>
- #include <algorithm>
- #include <random>
-
- #include "SearchHeuristic.h"
-
- #define COMMA 1
- #define PLUS 2
-
- #define GA_V1 1
- #define GA_V2 2
-
- class GGA : public SearchHeuristic
- {
- public:
- GGA(int mu, int lda, int selection, int crossover_method, int version, std::default_random_engine& randomizer);
- GGA(int mu, int lda, int selection, int crossover_method, std::default_random_engine& randomizer) :
- GGA(mu, lda, selection, crossover_method, GA_V1, randomizer) {};
- void prepare_tab();
- virtual double get_crossover_proba(double progress) = 0;
- virtual double get_sbm_proba(double progress) = 0;
- Result run();
- virtual ~GGA();
-
- protected:
- int m_mu;
- int m_lambda;
- int m_selection;
- int m_crossover_method;
- int m_version;
-
- std::default_random_engine m_randomizer;
- std::uniform_int_distribution<int> m_uniform_dist;
- bool m_is_prepared;
- Candidate** x_tab;
-
- private:
- };
-
- #endif // GGA_H
|