00001 #ifndef VShuffle_HPP_
00002 #define VShuffle_HPP_
00003
00004 #include <math.h>
00005 #include <vector>
00006
00007 #include "../Heuristic.hpp"
00008 #include "../NS.hpp"
00009 #include "../Evaluator.hpp"
00010 #include "../Solution.hpp"
00011
00012
00013
00014 #ifdef METHOD_DEBUG
00015 #define VShuffle_DEBUG
00016 #endif
00017
00018
00019 template<class R, class M>
00020 class VShuffle : public Heuristic<R,M>
00021 {
00022 public:
00023 using Heuristic<R, M>::exec;
00024
00025 virtual void exec(Solution<R>& s, double timelimit, double target_f)
00026 {
00027 cerr << "VShuffle exec("<<target_f<<","<<timelimit<<")" << endl;
00028 random_shuffle(s.getR().begin(),s.getR().end());
00029 }
00030
00031 virtual void exec(Solution<R>& s, Evaluation<M>& e, double timelimit, double target_f)
00032 {
00033 cerr << "VShuffle exec("<<target_f<<","<<timelimit<<")" << endl;
00034 random_shuffle(s.getR().begin(),s.getR().end());
00035 }
00036
00037 private:
00038 };
00039
00040 #endif