27 #include "../exceptions.h"
30 #include "rosenbrock.h"
32 namespace pagmo {
namespace problem {
58 const decision_vector::size_type n = x.size();
60 for (decision_vector::size_type i=0; i<n-1; ++i){
61 f[0] += 100 * (x[i]*x[i] -x[i+1])*(x[i]*x[i] -x[i+1]) + (x[i]-1)*(x[i]-1);
boost::shared_ptr< base > base_ptr
Alias for shared pointer to base problem.
std::vector< double > decision_vector
Decision vector type.
void objfun_impl(fitness_vector &, const decision_vector &) const
Implementation of the objective function.
rosenbrock(int=1)
Constructor from dimension.
void set_lb(const decision_vector &)
Set lower bounds from pagmo::decision_vector.
void set_ub(const decision_vector &)
Set upper bounds from pagmo::decision_vector.
std::vector< double > fitness_vector
Fitness vector type.
base_ptr clone() const
Clone method.
std::string get_name() const
Get problem's name.