|
PaGMO
1.1.5
|
Base migration class. More...
#include <base.h>

Public Member Functions | |
| 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... | |
Protected Member Functions | |
| virtual std::string | human_readable_extra () const |
| Return extra information in human readable representation. More... | |
Static Protected Member Functions | |
| 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 | |
| double | m_rate |
| Migration rate. More... | |
| rate_type | m_type |
| Migration rate type. | |
Friends | |
| class | boost::serialization::access |
Base migration class.
Embeds two properties used both in selection and replacement policies:
The get_n_individuals() method returns the number of individuals to be selected/replaced in the given population, according to the properties above.
Definition at line 69 of file migration/base.h.
| pagmo::migration::base::base | ( | const double & | rate, |
| rate_type | type | ||
| ) |
Constructor from migration rate and type.
If migration type is absolute, then the input rate will be converted to the nearest integer. Will fail if rate is outside the [0,INT_MAX] range.
If migration type is fractional, the constructor will fail if rate is outside the [0,1] range.
| [in] | rate | migration rate. |
| [in] | type | migration rate type. |
Definition at line 49 of file migration/base.cpp.
|
virtual |
| population::size_type pagmo::migration::base::get_n_individuals | ( | const population & | pop | ) | const |
Get number of individuals to migrate from/to input population.
| [in] | pop | input population. |
Definition at line 75 of file migration/base.cpp.
| std::string pagmo::migration::base::human_readable | ( | ) | const |
Return human readable representation.
Return a formatted string containing:
Definition at line 102 of file migration/base.cpp.
|
protectedvirtual |
Return extra information in human readable representation.
Return policy-specific information in human readable format. Default implementation returns an empty string.
Definition at line 118 of file migration/base.cpp.
|
inlinestaticprotected |
Iota function, usefull to fill iterator range with increasing values.
This function will fill the contents in the range [first,last) with increasing values, starting from *first = value.
| [in] | first | start of the iterator range. |
| [in] | last | end of the iterator range. |
| [in] | value | initial value. |
Definition at line 88 of file migration/base.h.
|
protected |
Migration rate.
It will be interpreted as an integer in case of absolute rate migration type, as a floating-point value in case of fractional migration type.
Definition at line 98 of file migration/base.h.
1.8.9.1