25 #ifndef PAGMO_MIGRATION_BASE_R_POLICY_H
26 #define PAGMO_MIGRATION_BASE_R_POLICY_H
28 #include <boost/shared_ptr.hpp>
32 #include "../config.h"
33 #include "../population.h"
34 #include "../serialization.h"
37 namespace pagmo {
namespace migration {
72 virtual base_r_policy_ptr clone()
const = 0;
85 virtual std::vector<std::pair<population::size_type,std::vector<population::individual_type>::size_type> >
86 select(
const std::vector<population::individual_type> &immigrants,
const population &destination)
const = 0;
90 friend class boost::serialization::access;
91 template <
class Archive>
92 void serialize(Archive &ar,
const unsigned int)
94 ar & boost::serialization::base_object<base>(*this);
Base class for migration replacement policies.
boost::shared_ptr< base_r_policy > base_r_policy_ptr
Shared pointer to base replacement policy.
Migration rate is interpreted as the fraction of individuals to migrate with respect to the orign/des...
rate_type
Type of migration rate.