Class that extends gsl_monte_function so that it can be constructed from arbitrary function objects.
More...
Class that extends gsl_monte_function so that it can be constructed from arbitrary function objects.
The arbitrary function object dould be a object of a class containing a member function whose argument and return values are doubles. The member function may be declared const.
To construct an object of this class from a function object t of class T, use, for example,
Class that extends gsl_monte_function so that it can be constructed from arbitrary function objects.
where T::operator is a member function whose single argument is a double. To assign, use, for example,
function make_function(T &c, double(T::*f)(gsl::vector const &), size_t const dim)
Make a gsl::monte::function from a function object and a suitable member function.
There are multiple forms of the function constructor and make_function(). These should allow you to construct a function object from any reasonable function object and quite a lot of unreasonable ones too. If f is an object of class gsl_monte_function, it is always possible to pass &f to a gsl function that requires a gsl_monte_function* argument.
This class is designed for flexibility rather than efficient copying. So if objects are to be copied frequently, consider using shared pointers or the like.
The class extends gsl_monte_function. If constructed from a function object, gsl_monte_function::params is always the function object and gsl_monte_function::function calls the member function using params to obtain an object to call the member function from.
Definition at line 59 of file monte.hpp.