00001 #ifndef Deme_h 00002 #define Deme_h 00003 00004 #include "Individual.h" 00005 00006 class HallOfFame; 00007 typedef boost::shared_ptr<HallOfFame> HallOfFameP; 00008 class StatCalc; 00009 typedef boost::shared_ptr<StatCalc> StatCalcP; 00010 00018 class Deme : public std::vector <IndividualP> 00019 { 00020 public: 00021 HallOfFameP hof_; 00022 StatCalcP stats_; 00023 00024 bool initialize(StateP state); 00025 bool replace(uint index, IndividualP newInd); 00026 void write(XMLNode&); 00027 void read(XMLNode&); 00028 00030 uint& getSize() 00031 { return nIndividuals_; } 00032 00033 protected: 00034 uint nIndividuals_; 00035 }; 00036 typedef boost::shared_ptr<Deme> DemeP; 00037 00038 #endif // Deme_h 00039