interpol/c/splines/linear/linear_splines.h
2019-07-24 19:19:41 +02: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