#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