QwtSpline(3) | Qwt User's Guide | QwtSpline(3) |
QwtSpline -
#include <qwt_spline.h>
enum SplineType { Natural, Periodic }
QwtSpline ()
QwtSpline (const QwtSpline &)
~QwtSpline ()
const QwtArray< double > & coefficientsA () const
const QwtArray< double > & coefficientsB () const
const QwtArray< double > & coefficientsC () const
bool isValid () const
QwtSpline & operator= (const QwtSpline &)
QPolygonF points () const
void reset ()
bool setPoints (const QPolygonF &points)
void setSplineType (SplineType)
SplineType splineType () const
double value (double x) const
bool buildNaturalSpline (const QPolygonF &)
bool buildPeriodicSpline (const QPolygonF &)
PrivateData * d_data
A class for spline interpolation.
The QwtSpline class is used for cubical spline interpolation. Two types of splines, natural and periodic, are supported.
Usage:
Example:
#include <qwt_spline.h> QPolygonF interpolate(const QPolygonF& points, int numValues) {
QwtSpline spline;
if ( !spline.setPoints(points) )
return points;
QPolygonF interpolatedPoints(numValues);
const double delta =
(points[numPoints - 1].x() - points[0].x()) / (points.size() - 1);
for(i = 0; i < points.size(); i++) / interpolate
{
const double x = points[0].x() + i * delta;
interpolatedPoints[i].setX(x);
interpolatedPoints[i].setY(spline.value(x));
}
return interpolatedPoints; }
Copy constructor
Parameters:
Determines the coefficients for a natural spline. Returns:
Determines the coefficients for a periodic spline. Returns:
Returns:
Returns:
Returns:
Assignment operator
Parameters:
Return points passed by setPoints
Calculate the spline coefficients. Depending on the value of periodic, this function will determine the coefficients for a natural or a periodic spline and store them internally.
Parameters:
Returns:
Warning:
Select the algorithm used for calculating the spline
Parameters:
See also:
Returns:
See also:
Calculate the interpolated function value corresponding to a given argument x.
Generated automatically by Doxygen for Qwt User's Guide from the source code.
Tue Nov 20 2012 | Version 5.2.3 |