Add IslandModel as islands container and algorithm launcher.
This commit is contained in:
parent
cf561b537a
commit
8d6d32e8cc
10 changed files with 283 additions and 18 deletions
|
|
@ -30,6 +30,8 @@ Contact: paradiseo-help@lists.gforge.inria.fr
|
|||
#ifndef ABS_ISLAND_H_
|
||||
#define ABS_ISLAND_H_
|
||||
|
||||
#include <atomic>
|
||||
|
||||
#include <eo>
|
||||
#include <migPolicy.h>
|
||||
|
||||
|
|
@ -38,6 +40,10 @@ namespace paradiseo
|
|||
namespace smp
|
||||
{
|
||||
|
||||
// Forward declaration
|
||||
template<class EOT>
|
||||
class IslandModel;
|
||||
|
||||
/** AbstractIsland: An abstract island.
|
||||
|
||||
@see smp::Island
|
||||
|
|
@ -47,6 +53,14 @@ template<class EOT>
|
|||
class AIsland
|
||||
{
|
||||
public:
|
||||
|
||||
virtual void operator()() = 0;
|
||||
|
||||
/**
|
||||
* Check if there is population to receive
|
||||
*/
|
||||
virtual void setModel(IslandModel<EOT>* _model) = 0;
|
||||
|
||||
/**
|
||||
* Send population to mediator
|
||||
* @param _select Method to select EOT to send
|
||||
|
|
@ -62,6 +76,9 @@ public:
|
|||
* Check if there is population to receive or to emigrate
|
||||
*/
|
||||
virtual void check(void) = 0;
|
||||
|
||||
virtual bool isStopped(void) = 0;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue