2019-07-24 17:19:41 +00:00
|
|
|
#ifndef interpol_splines_linear_h
|
|
|
|
#define interpol_splines_linear_h
|
|
|
|
|
|
|
|
#include <Python.h>
|
|
|
|
#include <numpy/arrayobject.h>
|
|
|
|
|
2019-12-05 07:38:14 +00:00
|
|
|
typedef struct _interpol_splines_linear_Interpolator_s
|
2019-07-24 17:19:41 +00:00
|
|
|
{
|
|
|
|
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.
|
2019-12-05 07:38:14 +00:00
|
|
|
double (* eval)(double, struct _interpol_splines_linear_Interpolator_s *);
|
|
|
|
} interpol_splines_linear_Interpolator;
|
2019-07-24 17:19:41 +00:00
|
|
|
|
|
|
|
|
|
|
|
double linear_spline_eval_double
|
|
|
|
( double x
|
2019-12-05 07:38:14 +00:00
|
|
|
, interpol_splines_linear_Interpolator * interpolator
|
2019-07-24 17:19:41 +00:00
|
|
|
);
|
|
|
|
float linear_spline_eval_float
|
|
|
|
( float x
|
2019-12-05 07:38:14 +00:00
|
|
|
, interpol_splines_linear_Interpolator * interpolator
|
2019-07-24 17:19:41 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
#ifndef interpol_splines_linear_c
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|