PaGMO  1.1.5
Public Member Functions | Friends
pagmo::migration::best_kill_s_policy Class Reference

"Choose best and kill him" migration selection policy. More...

#include <best_kill_s_policy.h>

Inheritance diagram for pagmo::migration::best_kill_s_policy:
Inheritance graph
[legend]

Public Member Functions

 best_kill_s_policy (const double &rate=1, rate_type type=absolute)
 Constructor from migration rate and type. More...
 
base_s_policy_ptr clone () const
 Clone method. More...
 
std::vector< population::individual_typeselect (population &) const
 Select individuals to emigrate from the given population. More...
 
- Public Member Functions inherited from pagmo::migration::base_s_policy
 base_s_policy (const double &rate=1, rate_type type=absolute)
 Constructor from migration rate and type. More...
 
virtual ~base_s_policy ()
 Trivial destructor. More...
 
- Public Member Functions inherited from pagmo::migration::base
 base (const double &, rate_type)
 Constructor from migration rate and type. More...
 
population::size_type get_n_individuals (const population &) const
 Get number of individuals to migrate from/to input population. More...
 
std::string human_readable () const
 Return human readable representation. More...
 
virtual ~base ()
 Destructor. More...
 

Friends

class boost::serialization::access
 

Additional Inherited Members

- Protected Member Functions inherited from pagmo::migration::base
virtual std::string human_readable_extra () const
 Return extra information in human readable representation. More...
 
- Static Protected Member Functions inherited from pagmo::migration::base
template<class ForwardIterator , class T >
static void iota (ForwardIterator first, ForwardIterator last, T value)
 Iota function, usefull to fill iterator range with increasing values. More...
 
- Protected Attributes inherited from pagmo::migration::base
double m_rate
 Migration rate. More...
 
rate_type m_type
 Migration rate type.
 

Detailed Description

"Choose best and kill him" migration selection policy.

This policy is to choose best individuals from the population as migrating individuals and kill tem in the current population replacing them with random individuals.

Author
Dario Izzo (dario.nosp@m..izz.nosp@m.o@gma.nosp@m.il.c.nosp@m.om)
Marek RuciƄski (marek.nosp@m..ruc.nosp@m.inski.nosp@m.@gma.nosp@m.il.co.nosp@m.m)
Francesco Biscani (blues.nosp@m.carn.nosp@m.i@gma.nosp@m.il.c.nosp@m.om)

Definition at line 47 of file best_kill_s_policy.h.

Constructor & Destructor Documentation

pagmo::migration::best_kill_s_policy::best_kill_s_policy ( const double &  rate = 1,
rate_type  type = absolute 
)

Constructor from migration rate and type.

Parameters
[in]ratemigration rate.
[in]typemigration rate type.
See also
base_s_policy::base_s_policy.

Definition at line 42 of file best_kill_s_policy.cpp.

Member Function Documentation

base_s_policy_ptr pagmo::migration::best_kill_s_policy::clone ( ) const
virtual

Clone method.

Provided that the derived policy implements properly the copy constructor, virtually all implementations of this method will look like this:

return base_ptr(new derived_policy(*this));
               @return migration::base_s_policy_ptr to a copy of this.

Implements pagmo::migration::base_s_policy.

Definition at line 44 of file best_kill_s_policy.cpp.

std::vector< population::individual_type > pagmo::migration::best_kill_s_policy::select ( population pop) const
virtual

Select individuals to emigrate from the given population.

This is the method that actually implements the policy. Output vector should contain copies of selected individuals.

Parameters
[in,out]popsource population. In some cases (see best_kill_s-policy) it can be modified (e.g. killing the selected individual)
Returns
a vector containing selected individuals.

Implements pagmo::migration::base_s_policy.

Definition at line 49 of file best_kill_s_policy.cpp.


The documentation for this class was generated from the following files: