interpol/c/splines/linear/linear_splines.h
2019-12-05 08:38:14 +01:00

36 lines
789 B
C

#ifndef interpol_splines_linear_h
#define interpol_splines_linear_h
#include <Python.h>
#include <numpy/arrayobject.h>
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