/* spline.c Cubic interpolating spline. */ /* Gordon Erlebacher * Transform to a class to simplify usage. Interface to spline.c */ #ifndef _SPLINE_H_ #define _SPLINE_H_ #include class Spline { public: std::vector x, y, b, c, d; int nbpts; int last; int iflag; // error flag // need constructor Spline(); Spline(std::vector x, std::vector y); void push_back(double x, double y); double operator()(double x); // evaluate the spline //private: int spline (int end1, int end2, double slope1, double slope2); double eval (double u); }; #endif