32 #ifndef SHARK_ALGORITHMS_DIRECT_SEARCH_OPERATORS_MUTATION_POLYNOMIALMUTATION_H 33 #define SHARK_ALGORITHMS_DIRECT_SEARCH_OPERATORS_MUTATION_POLYNOMIALMUTATION_H 48 void init( RealVector
const& lower, RealVector
const& upper ) {
59 template<
typename Indiv
idualType>
63 for(
unsigned int i = 0; i < point.size(); i++ ) {
77 double delta = std::pow(delta1 ,
m_nm + 1.);
78 deltaQ = 2.0 * u + (1.0 - 2.0 * u) * delta;
79 deltaQ = std::pow(deltaQ, 1.0/(
m_nm+1.0)) - 1. ;
81 double delta = std::pow(delta2 ,
m_nm + 1.);
82 deltaQ = 2 * (1- u) + 2. * (u - .5) * delta;
83 deltaQ = 1. - std::pow(deltaQ , 1.0/(
m_nm+1.0));
104 template<
typename Archive>
105 void serialize( Archive & archive,
const unsigned int version ) {
106 archive & BOOST_SERIALIZATION_NVP(
m_nm );
107 archive & BOOST_SERIALIZATION_NVP(
m_prob );
108 archive & BOOST_SERIALIZATION_NVP(
m_upper );
109 archive & BOOST_SERIALIZATION_NVP(
m_lower );