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 );
static void Fdf(double x, void *p, double *f, double *df)
This namespace contains pre-defined functions to be used in conjuction with TExecutor::Map and TExecu...
static double Df(double x, void *p)
double(* GSLFuncPointer)(double, void *)
Function pointer corresponding to gsl_function signature.
Class for adapting any C++ functor class to C function pointers used by GSL.
Namespace for new Math classes and functions.
virtual ~GSLFunctionAdapter()
static double F(double x, void *p)