Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

# qwt_spline.h

    00001 /* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
    00002  * Qwt Widget Library
    00003  * Copyright (C) 1997   Josef Wilgen
    00004  * Copyright (C) 2002   Uwe Rathmann
    00005  *
    00006  * This library is free software; you can redistribute it and/or
    00007  * modify it under the terms of the Qwt License, Version 1.0
    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     // coefficient vectors
    00082     double *d_a;
    00083     double *d_b;
    00084     double *d_c;
    00085     double *d_d;
    00086
    00087     // values
    00088     double *d_x;
    00089     double *d_y;
    00090     double *d_xbuffer;
    00091     double *d_ybuffer;
    00092     int d_size;
    00093
    00094     //flags
    00095     int d_buffered;
    00096 };
    00097
    00098
    00099
    00100
    00101
    00102 #endif
    00103
    00104
    00105
    00106
    00107