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);
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.
void function(const Char_t *name_, T fun, const Char_t *docstring=0)
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...