27 #include "antioch_config.h"
29 #ifdef ANTIOCH_HAVE_GSL
35 namespace AntiochPrivate
37 GSLSplinerImplementation::GSLSplinerImplementation()
38 :_acc(gsl_interp_accel_alloc()),
42 GSLSplinerImplementation::~GSLSplinerImplementation()
45 gsl_interp_accel_free(_acc);
48 void GSLSplinerImplementation::spline_init(
const double* x,
const double* y,
unsigned int size )
50 _spline = gsl_spline_alloc(gsl_interp_cspline, size);
51 gsl_spline_init(_spline, x, y, size);
54 void GSLSplinerImplementation::spline_clear()
56 gsl_spline_free(_spline);
59 double GSLSplinerImplementation::eval(
double x)
const
61 return gsl_spline_eval(_spline,x,_acc);
64 double GSLSplinerImplementation::eval_deriv(
double x)
const
66 return gsl_spline_eval_deriv(_spline,x,_acc);
72 #endif// if ANTIOCH_HAVE_GSL
The parameters are reduced parameters.