Enriching the report description
[satune.git] / src / Tuner / randomtuner.h
1 #ifndef RANDOMTUNER_H
2 #define RANDOMTUNER_H
3 #include "classlist.h"
4 #include "structs.h"
5 #include "multituner.h"
6
7 /**
8  * This is a Tuner which is being used for 
9  */
10 class RandomTuner {
11 public:
12         RandomTuner(uint _budget, uint _timeout);
13         ~RandomTuner();
14         void addProblem(const char *filename);
15         void addTuner(SearchTuner *tuner);
16         void tune();
17         void printData();
18         CMEMALLOC;
19 protected:
20         long long evaluate(Problem *problem, TunerRecord *tuner);
21         SearchTuner *mutateTuner(SearchTuner *oldTuner, uint k);
22         void updateTimeout(Problem *problem, long long metric);
23         bool randomMutation(SearchTuner *tuner);
24         bool tunerExists(SearchTuner *tunerRec);
25         /**
26          * returns the index of the tuner which is subtune of
27          * the newTuner 
28          * @param newTuner
29          * @return 
30          */
31         int subtuneIndex(SearchTuner *newTuner);
32         
33         TunerRecord *tune(SearchTuner *tuner);
34         Vector<TunerRecord *> allTuners;
35         Vector<TunerRecord *> explored;
36         Vector<Problem *> problems;
37         Vector<TunerRecord *> tuners;
38         uint budget;
39         uint timeout;
40         int execnum;
41 };
42
43 #endif