25 #include <boost/thread/locks.hpp>
26 #include <boost/thread/mutex.hpp>
27 #include <gsl/gsl_vector.h>
30 #include "../exceptions.h"
31 #include "../gsl_init.h"
32 #include "../problem/base.h"
36 namespace pagmo {
namespace algorithm {
39 boost::mutex base_gsl::m_mutex;
41 const gsl_init &base_gsl::get_init()
44 boost::lock_guard<boost::mutex> lock(m_mutex);
45 static const gsl_init retval;
55 if (!get_init().m_init) {
56 pagmo_throw(std::runtime_error,
"GSL support could not be initialised");
74 par->
x[i] = gsl_vector_get(v,i);
base_gsl()
Default constructor.
size_type get_dimension() const
Return global dimension.
fitness_vector objfun(const decision_vector &) const
Return fitness of pagmo::decision_vector.
fitness_vector f
Fitness vector.
size_type get_i_dimension() const
Return integer dimension.
static double objfun_wrapper(const gsl_vector *, void *)
Objective function wrapper.
Structure to feed parameters to the wrappers for the objective function and its derivative.
decision_vector x
Decision vector.
problem::base const * p
Pointer to the problem.
decision_vector::size_type size_type
Problem's size type: the same as pagmo::decision_vector's size type.