25 #ifndef PAGMO_ISLAND_H
26 #define PAGMO_ISLAND_H
30 #include "base_island.h"
32 #include "algorithm/base.h"
33 #include "migration/base_r_policy.h"
34 #include "migration/base_s_policy.h"
35 #include "migration/best_s_policy.h"
36 #include "migration/fair_r_policy.h"
37 #include "population.h"
38 #include "problem/base.h"
39 #include "serialization.h"
48 namespace boost {
namespace serialization {
50 template <
class Archive>
51 void save_construct_data(Archive &,
const pagmo::island *,
const unsigned int);
53 template <
class Archive>
54 inline void load_construct_data(Archive &,
pagmo::island *,
const unsigned int);
90 std::string get_name()
const;
93 template <
class Archive>
94 friend void boost::serialization::save_construct_data(Archive &,
const island *,
const unsigned int);
95 template <
class Archive>
96 friend void boost::serialization::load_construct_data(Archive &,
island *,
const unsigned int);
97 friend class boost::serialization::access;
98 template <
class Archive>
99 void serialize(Archive &ar,
const unsigned int)
102 ar & boost::serialization::base_object<base_island>(*this);
108 namespace boost {
namespace serialization {
110 template <
class Archive>
111 inline void save_construct_data(Archive &ar,
const pagmo::island *isl,
const unsigned int)
120 template <
class Archive>
121 inline void load_construct_data(Archive &ar,
pagmo::island *isl,
const unsigned int)
129 ::new(isl)
pagmo::island(*algo,*prob);
134 BOOST_CLASS_EXPORT_KEY(
pagmo::island)
boost::shared_ptr< base > base_ptr
Alias for shared pointer to base algorithm.
boost::shared_ptr< base > base_ptr
Alias for shared pointer to base problem.
Base class for migration replacement policies.
Base class for migration selection policies.
"Choose best" migration selection policy.
virtual base_ptr clone() const =0
Clone method.
algorithm::base_ptr m_algo
Algorithm.
boost::shared_ptr< base_island > base_island_ptr
Alias for the shared pointer to a pagmo::base_island.
population m_pop
Population.