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
00016 class Deme : public std::vector <IndividualP>
00017 {
00018 public:
00019 HallOfFameP hof_;
00020 StatCalcP stats_;
00021
00022 bool initialize(StateP state);
00023 bool replace(uint index, IndividualP newInd);
00024 void write(XMLNode&);
00025 void read(XMLNode&);
00026 uint& getSize()
00027 { return nIndividuals_; }
00028
00029 protected:
00030 uint nIndividuals_;
00031 };
00032 typedef boost::shared_ptr<Deme> DemeP;
00033
00034 #endif // Deme_h
00035