25 #include <boost/math/constants/constants.hpp>
28 #include "../exceptions.h"
31 #include "michalewicz.h"
33 namespace pagmo {
namespace problem {
47 set_ub(boost::math::constants::pi<double>());
58 pagmo_assert(f.size() == 1);
59 decision_vector::size_type n = x.size();
62 for (decision_vector::size_type i=0; i<n; i++){
63 retval -= sin(x[i]) * pow(sin((i+1)*x[i]*x[i]/boost::math::constants::pi<double>()) , 2*m_m);
boost::shared_ptr< base > base_ptr
Alias for shared pointer to base problem.
std::vector< double > decision_vector
Decision vector type.
void set_lb(const decision_vector &)
Set lower bounds from pagmo::decision_vector.
base_ptr clone() const
Clone method.
void set_ub(const decision_vector &)
Set upper bounds from pagmo::decision_vector.
void objfun_impl(fitness_vector &, const decision_vector &) const
Implementation of the objective function.
std::vector< double > fitness_vector
Fitness vector type.
michalewicz(int n=1, int m=10)
Constructor from dimension.
std::string get_name() const
Get problem's name.