ECF 1.5
Deme.h
1#ifndef Deme_h
2#define Deme_h
3
4#include "Individual.h"
5
6class HallOfFame;
7typedef boost::shared_ptr<HallOfFame> HallOfFameP;
8class StatCalc;
9typedef boost::shared_ptr<StatCalc> StatCalcP;
10
18class Deme : public std::vector <IndividualP>
19{
20public:
21 HallOfFameP hof_;
22 StatCalcP stats_;
23
24 bool initialize(StateP state);
25 bool replace(uint index, IndividualP newInd);
26 void write(XMLNode&);
27 void read(XMLNode&);
28
30 uint& getSize()
31 { return nIndividuals_; }
32
33protected:
34 uint nIndividuals_;
35};
36typedef boost::shared_ptr<Deme> DemeP;
37
38#endif // Deme_h
39
Deme class - inherits a vector of Individual objects.
Definition: Deme.h:19
uint & getSize()
get number of indiviuals (deme size)
Definition: Deme.h:30
void read(XMLNode &)
Definition: Deme.cpp:54
bool replace(uint index, IndividualP newInd)
replace ind. at index with newInd
Definition: Deme.cpp:23
bool initialize(StateP state)
initialize deme
Definition: Deme.cpp:5
Records a set of best-so-far individuals.
Definition: HallOfFame.h:14
Statistics calculation class.
Definition: StatCalc.h:20