31#ifndef ROOT_Math_GSLFunctionWrapper
32#define ROOT_Math_GSLFunctionWrapper
34#include "gsl/gsl_math.h"
75 template<
class FuncType>
92 return (
fFunc.function != 0) ? true :
false;
131 void Fdf(
double x,
double &
f,
double & df) {
132 return GSL_FN_FDF_EVAL_F_DF(&
fFunc,
x, &
f, &df);
137 return (
fFunc.f != 0 ) ? true :
false;
struct gsl_function_struct gsl_function
#define GSL_FN_EVAL(F, x)
typedef void((*Func_t)())
Class for adapting any C++ functor class to C function pointers used by GSL.
class to wrap a gsl_function_fdf (with derivatives)
void SetDerivPointer(GSLFuncPointer f)
bool IsValid()
check if function is valid (has been set)
double operator()(double x)
GSLFunctionDerivWrapper()
void SetFdfPointer(GSLFdfPointer f)
void SetFuncPointer(GSLFuncPointer f)
gsl_function_fdf * GetFunc()
void Fdf(double x, double &f, double &df)
double Derivative(double x)
Wrapper class to the gsl_function C structure.
void SetFunction(const FuncType &f)
fill the GSL C struct from a generic C++ callable object implementing operator()
void SetFuncPointer(GSLFuncPointer f)
set in the GSL C struct the pointer to the function evaluation
double operator()(double x)
void SetParams(void *p)
set in the GSL C struct the extra-object pointer
GSLFuncPointer FunctionPtr()
bool IsValid()
check if function is valid (has been set)
Namespace for new Math classes and functions.
void(* GSLFdfPointer)(double, void *, double *, double *)
double(* GSLFuncPointer)(double, void *)
Function pointer corresponding to gsl_function signature.
Namespace for new ROOT classes and functions.