31#ifndef ROOT_Math_GSLFunctionWrapper
32#define ROOT_Math_GSLFunctionWrapper
34#include "gsl/gsl_math.h"
75 template<
class FuncType>
78 assert (
p !=
nullptr);
114 fFunc.params =
nullptr;
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 !=
nullptr ) ? true :
false;
#define GSL_FN_EVAL(F, x)
winID h TVirtualViewer3D TVirtualGLPainter p
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.
This file contains a specialised ROOT message handler to test for diagnostic in unit tests.
double(* function)(double x, void *params)