#ifndef interpol_splines_linear_h #define interpol_splines_linear_h #include #include typedef struct _interpol_splines_linear_InterPolator_s { PyObject_HEAD long unsigned int grid_points; PyArrayObject * x; PyArrayObject * y; // This is either // linear_spline_eval_double or linear_spline_eval_float and // is used to evaluate the spline at a given x efficiently. double (* eval)(double, struct _interpol_splines_linear_InterPolator_s *); } interpol_splines_linear_InterPolator; double linear_spline_eval_double ( double x , interpol_splines_linear_InterPolator * interpolator ); float linear_spline_eval_float ( float x , interpol_splines_linear_InterPolator * interpolator ); #ifndef interpol_splines_linear_c #endif #endif