00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef QWT_SPLINE_H
00011 #define QWT_SPLINE_H
00012
00013 #include "qwt_array.h"
00014 #include "qwt_global.h"
00015
00063 class QWT_EXPORT QwtSpline
00064 {
00065 public:
00066 QwtSpline();
00067 ~QwtSpline();
00068
00069 double value(double x) const;
00070 int recalc(double *x, double *y, int n, int periodic = 0);
00071 int recalc(const QwtArray<double> &x, const QwtArray<double> &y,
00072 int periodic = 0);
00073 void copyValues(int tf = 1);
00074
00075 private:
00076 int buildPerSpline();
00077 int buildNatSpline();
00078 int lookup(double x) const;
00079 void cleanup();
00080
00081
00082 double *d_a;
00083 double *d_b;
00084 double *d_c;
00085 double *d_d;
00086
00087
00088 double *d_x;
00089 double *d_y;
00090 double *d_xbuffer;
00091 double *d_ybuffer;
00092 int d_size;
00093
00094
00095 int d_buffered;
00096 };
00097
00098
00099
00100
00101
00102 #endif
00103
00104
00105
00106
00107