-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsettings.h
34 lines (27 loc) · 802 Bytes
/
settings.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#ifndef INCLUDE_SETTINGS_H
#define INCLUDE_SETTINGS_H
#include <boost/serialization/access.hpp>
#include <string>
class Settings {
private:
friend class boost::serialization::access;
template<class Archive>
void serialize(Archive& ar, const unsigned int version) {
ar & this->population_size;
ar & this->survivor_ratio;
ar & this->rounds;
ar & this->mutation_probability;
ar & this->crossover_probability;
ar & this->stats_round_divisor;
}
public:
int population_size;
double survivor_ratio;
int rounds;
double mutation_probability;
double crossover_probability;
int stats_round_divisor;
static Settings import_from_file(std::string file_path);
void print_settings();
};
#endif //INCLUDE_SETTINGS_H