34#ifndef ROOT_Math_GSLFunctionAdapter
35#define ROOT_Math_GSLFunctionAdapter
62 template<
class UserFunc>
70 static double F(
double x,
void * p) {
72 UserFunc * function =
reinterpret_cast< UserFunc *
> (p);
73 return (*function)(
x );
77 static double Df(
double x,
void * p) {
79 UserFunc * function =
reinterpret_cast< UserFunc *
> (p);
80 return (*function).Derivative(
x );
83 static void Fdf(
double x,
void * p,
double *
f,
double *df ) {
85 UserFunc * function =
reinterpret_cast< UserFunc *
> (p);
86 *
f = (*function) (
x );
87 *df = (*function).Derivative(
x );
Class for adapting any C++ functor class to C function pointers used by GSL.
static void Fdf(double x, void *p, double *f, double *df)
static double F(double x, void *p)
virtual ~GSLFunctionAdapter()
static double Df(double x, void *p)
Namespace for new Math classes and functions.
double(* GSLFuncPointer)(double, void *)
Function pointer corresponding to gsl_function signature.
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...