-
Notifications
You must be signed in to change notification settings - Fork 0
/
Config.h
106 lines (89 loc) · 2.66 KB
/
Config.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
/**
* Config.h
*
* Created on: Aug 9, 2011
* Author: Jeroen Vlek
* Email: [email protected]
* Website: www.perceptivebits.com
* License: Free Beer (Feel free to use it in every
* way possible and if you like it, make
* sure to give me credit and buy me a drink
* if we ever meet ;) )
*/
#ifndef CONFIG_H_
#define CONFIG_H_
#include <string>
/**
* A class with only static members that contains all the config values.
*/
class Config
{
public:
static unsigned int GetGenomeSize();
static unsigned int GetPopulationSize();
static unsigned int GetHeight();
static unsigned int GetMaxGeneSize();
static unsigned int GetMinGeneSize();
static unsigned int GetWidth();
static unsigned int GetMutationInterval();
static unsigned int GetReportingInterval();
static unsigned int GetNumWorkerThreads();
static unsigned int GetDisplaySize();
static void SetGenomeSize(const unsigned int genomeSize);
static void SetPopulationSize(const unsigned int populationSize);
static void SetHeight(const unsigned int height);
static void SetMaxGeneSize(const unsigned int maxGeneSize);
static void SetMinGeneSize(const unsigned int minGeneSize);
static void SetWidth(const unsigned int width);
static void SetMutationInterval(const unsigned int mutationInterval);
static void SetReportingInterval(const unsigned int reportingInterval);
static void SetNumWorkerThreads(unsigned int numWorkerThreads);
static void SetDisplaySize(unsigned int displaySize);
static std::string GetTestImageName();
private:
Config();
virtual ~Config();
/**
* Width of the target image.
*/
static unsigned int m_Width;
/**
* Height of the target image.
*/
static unsigned int m_Height;
/**
* Minimum size of the genes, e.g. minimum number of points in a polygon
* gene or minimum radius of a circular gene.
*/
static unsigned int m_MinGeneSize;
/**
* Maximum size of the genes, e.g. maximum number of points in a polygon
* gene or maximum radius of a circular gene.
*/
static unsigned int m_MaxGeneSize;
/**
* Number of genes per organism
*/
static unsigned int m_GenomeSize;
/**
* Population size
*/
static unsigned int m_PopulationSize;
/**
* Number of iterations that need to pass between mutations.
*/
static unsigned int m_MutationInterval;
/**
* Number of iterations that need to pass between logs.
*/
static unsigned int m_ReportingInterval;
/**
* Number of worker threads
*/
static unsigned int m_NumWorkerThreads;
/**
* How many of the top images are displayed
*/
static unsigned int m_DisplaySize;
};
#endif /* CONFIG_H_ */