8 #ifndef GSLPP_FUNCTION_ADAPTER_H
9 #define GSLPP_FUNCTION_ADAPTER_H
11 #include <gsl/gsl_math.h>
15 static double gslFunctionAdapter(
double x,
void* p)
19 F*
function = static_cast<F*>( p );
20 return (*
function)( x );
26 gsl_function gslFunction;
31 gslFunction.function = &gslFunctionAdapter<F>;
33 gslFunction.params = const_cast<void*>( p );