00001 #ifndef Context_h
00002 #define Context_h
00003
00011 class EvolutionContext
00012 {
00013 friend class State;
00014
00015 public:
00016 IndividualP evaluatedIndividual;
00017 IndividualP mutatedIndividual;
00018 IndividualP firstParent, secondParent, child;
00019
00023 bool initialize()
00024 {
00025 bTerminate_ = false;
00026 generationNo_ = 0;
00027 uint nEvaluations_ = 0;
00028 return true;
00029 }
00030
00034 uint increaseEvaluations()
00035 { return ++nEvaluations_; }
00036
00040 uint getEvaluations()
00041 { return nEvaluations_; }
00042
00043 protected:
00044 bool bTerminate_;
00045 uint generationNo_;
00046 uint nEvaluations_;
00047 };
00048 typedef boost::shared_ptr<EvolutionContext> EvolutionContextP;
00049
00050 #endif // Context_h