Add topology to IslandModel, sending messages mecanism, rewrite Bimap container

This commit is contained in:
quemy 2012-11-24 15:26:11 +01:00
commit b3f83717d6
10 changed files with 162 additions and 63 deletions

View file

@ -81,12 +81,6 @@ public:
*/
virtual void setModel(IslandModel<EOT>* _model);
/**
* Update the list of imigrants.
* @param _data Elements to integrate in the main population.
*/
void update(eoPop<EOT>& _data);
/**
* Return a reference to the island population.
* @return Reference to the island population
@ -98,11 +92,17 @@ public:
*/
virtual void check(void);
/**
* Update the list of imigrants.
* @param _data Elements to integrate in the main population.
*/
void update(eoPop<EOT> _data);
/**
* Check if the algorithm is stopped.
* @return true if stopped
*/
virtual bool isStopped(void);
virtual bool isStopped(void) const;
protected:
@ -121,7 +121,7 @@ protected:
eoEvalFunc<EOT>& eval;
eoPop<EOT> pop;
EOAlgo<EOT> algo;
std::queue<eoPop<EOT>*> listImigrants;
std::queue<eoPop<EOT>> listImigrants;
IntPolicy<EOT>& intPolicy;
MigPolicy<EOT>& migPolicy;
std::atomic<bool> stopped;