00001 00019 #ifndef _RESTART_H 00020 00021 #define _RESTART_H 1 00022 00023 #include "real.h" 00024 #include "define.h" 00025 #include "problem.h" 00026 #include "populationreal.h" 00027 00028 namespace realea { 00029 00035 class RestartStrategy { 00036 public: 00037 virtual void apply(PopulationReal *pop_alg, Problem *problem, IEvalInd *eval)=0; 00038 virtual ~RestartStrategy() {} 00039 }; 00040 00044 class RestartBest: public RestartStrategy { 00045 public: 00046 RestartBest(void) {} 00047 void apply(PopulationReal *pop_alg, Problem *problem, IEvalInd *eval); 00048 }; 00049 00054 class RestartReduce: public RestartBest { 00055 public: 00056 RestartReduce(double scale); 00057 void apply(PopulationReal *pop_alg, Problem *problem, IEvalInd *eval); 00058 private: 00059 double m_scale; 00060 }; 00061 00062 00063 } 00064 #endif