28 #include "../population.h"
30 #include "base_s_policy.h"
31 #include "best_kill_s_policy.h"
33 namespace pagmo {
namespace migration {
55 std::vector<population::individual_type> result;
57 std::vector<population::size_type> best_idx = pop.get_best_idx(migration_rate);
Base class for migration selection policies.
const individual_type & get_individual(const size_type &) const
Get constant reference to individual at position n.
std::vector< population::individual_type > select(population &) const
Select individuals to emigrate from the given population.
population::size_type get_n_individuals(const population &) const
Get number of individuals to migrate from/to input population.
base_s_policy_ptr clone() const
Clone method.
boost::shared_ptr< base_s_policy > base_s_policy_ptr
Shared pointer to base selection policy.
container_type::size_type size_type
Population size type.
void reinit(const size_type &)
Re-initialise individual at position idx.
best_kill_s_policy(const double &rate=1, rate_type type=absolute)
Constructor from migration rate and type.
"Choose best and kill him" migration selection policy.
rate_type
Type of migration rate.