Add homogeneous test. Pop is not created by the island anymore and has to me given to the island.
This commit is contained in:
parent
bae0e8da8b
commit
c90fdc579f
5 changed files with 147 additions and 16 deletions
|
|
@ -27,12 +27,9 @@ ParadisEO WebSite : http://paradiseo.gforge.inria.fr
|
|||
Contact: paradiseo-help@lists.gforge.inria.fr
|
||||
*/
|
||||
|
||||
#include <type_traits>
|
||||
|
||||
|
||||
template<template <class> class EOAlgo, class EOT>
|
||||
template<class... Args>
|
||||
paradiseo::smp::Island<EOAlgo,EOT>::Island(unsigned _popSize, eoInit<EOT>& _chromInit, IntPolicy<EOT>& _intPolicy, MigPolicy<EOT>& _migPolicy, Args&... args) :
|
||||
paradiseo::smp::Island<EOAlgo,EOT>::Island(eoPop<EOT>& _pop, IntPolicy<EOT>& _intPolicy, MigPolicy<EOT>& _migPolicy, Args&... args) :
|
||||
// The PPExpander looks for the continuator in the parameters pack.
|
||||
// The private inheritance of ContWrapper wraps the continuator and add islandNotifier.
|
||||
ContWrapper<EOT>(Loop<Args...>().template findValue<eoContinue<EOT>>(args...), this),
|
||||
|
|
@ -40,7 +37,7 @@ paradiseo::smp::Island<EOAlgo,EOT>::Island(unsigned _popSize, eoInit<EOT>& _chro
|
|||
algo(EOAlgo<EOT>(wrap_pp<eoContinue<EOT>>(this->ck,args)...)),
|
||||
// With the PPE we look for the eval function in order to evaluate EOT to integrate
|
||||
eval(Loop<Args...>().template findValue<eoEvalFunc<EOT>>(args...)),
|
||||
pop(_popSize, _chromInit),
|
||||
pop(_pop),
|
||||
intPolicy(_intPolicy),
|
||||
migPolicy(_migPolicy),
|
||||
stopped(false),
|
||||
|
|
|
|||
|
|
@ -34,8 +34,13 @@ Contact: paradiseo-help@lists.gforge.inria.fr
|
|||
#include <vector>
|
||||
#include <utility>
|
||||
#include <atomic>
|
||||
#include <type_traits>
|
||||
|
||||
#include <eoEvalFunc.h>
|
||||
#include <eoSelect.h>
|
||||
#include <eoAlgo.h>
|
||||
#include <eoPop.h>
|
||||
|
||||
#include <eo>
|
||||
#include <abstractIsland.h>
|
||||
#include <islandModel.h>
|
||||
#include <migPolicy.h>
|
||||
|
|
@ -68,7 +73,7 @@ public:
|
|||
* @param args Parameters to construct the algorithm.
|
||||
*/
|
||||
template<class... Args>
|
||||
Island(unsigned _popSize, eoInit<EOT>& _chromInit, IntPolicy<EOT>& _intPolicy, MigPolicy<EOT>& _migPolicy, Args&... args);
|
||||
Island(eoPop<EOT>& pop, IntPolicy<EOT>& _intPolicy, MigPolicy<EOT>& _migPolicy, Args&... args);
|
||||
|
||||
/**
|
||||
* Start the island.
|
||||
|
|
@ -118,7 +123,7 @@ protected:
|
|||
virtual void receive(void);
|
||||
|
||||
eoEvalFunc<EOT>& eval;
|
||||
eoPop<EOT> pop;
|
||||
eoPop<EOT>& pop;
|
||||
EOAlgo<EOT> algo;
|
||||
std::queue<eoPop<EOT>> listImigrants;
|
||||
IntPolicy<EOT>& intPolicy;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue