qwt_spline.h
/* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
* Qwt Widget Library
* Copyright (C) 1997 Josef Wilgen
* Copyright (C) 2002 Uwe Rathmann
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the Qwt License, Version 1.0
*****************************************************************************/
#ifndef QWT_SPLINE_H
#define QWT_SPLINE_H
#include "qwt_global.h"
#include <qpolygon.h>
#include <qvector.h>
class QWT_EXPORT QwtSpline
{
public:
enum SplineType
{
Natural,
Periodic
};
QwtSpline();
QwtSpline( const QwtSpline & );
~QwtSpline();
QwtSpline &operator=( const QwtSpline & );
void setSplineType( SplineType );
SplineType splineType() const;
bool setPoints( const QPolygonF& points );
QPolygonF points() const;
void reset();
bool isValid() const;
double value( double x ) const;
const QVector<double> &coefficientsA() const;
const QVector<double> &coefficientsB() const;
const QVector<double> &coefficientsC() const;
protected:
bool buildNaturalSpline( const QPolygonF & );
bool buildPeriodicSpline( const QPolygonF & );
private:
class PrivateData;
PrivateData *d_data;
};
#endif
QwtSpline::SplineType
SplineType
Spline type.
Definition: qwt_spline.h:61
QwtSpline
A class for spline interpolation.
Definition: qwt_spline.h:57
QwtSpline::Natural
A natural spline.
Definition: qwt_spline.h:64