Finding the 3 best tuners after the learning process
[satune.git] / src / Tuner / multituner.h
index 1c654eb3cf7c1ea748eb73ca0be129b5283bc7ae..398eb84bb9b3fd3cc1337e1ae5d78bb536e293ae 100644 (file)
@@ -15,6 +15,7 @@ private:
        int problemnumber;
        int result;
        char *problem;
+       long long besttime;
        friend class MultiTuner;
 };
 
@@ -42,9 +43,11 @@ public:
        void addProblem(const char *filename);
        void addTuner(SearchTuner *tuner);
        void readData(uint numRuns);
+       void updateTimeout(Problem *problem, long long metric);
        void tuneK();
        void tuneComp();
        void printData();
+       void findBestThreeTuners();
        CMEMALLOC;
 protected:
        long long evaluate(Problem *problem, TunerRecord *tuner);
@@ -53,7 +56,11 @@ protected:
        void mapProblemsToTuners(Vector<TunerRecord *> *tunerV);
        void improveTuners(Vector<TunerRecord *> *tunerV);
        TunerRecord *tune(TunerRecord *tuner);
-
+        inline long long min(long long num1, long long num2, long long num3){
+                return num1 < num2 && num1 < num3? num1:
+                        num2 < num3? num2 : num3;
+        }
+        
        Vector<TunerRecord *> allTuners;
        Vector<Problem *> problems;
        Vector<TunerRecord *> tuners;