QwtSpline man page on DragonFly

Man page or keyword search:  
man Server   44335 pages
apropos Keyword Search (all sections)
Output format
DragonFly logo
[printable version]

QwtSpline(3)		       Qwt User's Guide			  QwtSpline(3)

NAME
       QwtSpline -

SYNOPSIS
       #include <qwt_spline.h>

   Public Types
       enum SplineType { Natural, Periodic }

   Public Member Functions
       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

   Protected Member Functions
       bool buildNaturalSpline (const QPolygonF &)
       bool buildPeriodicSpline (const QPolygonF &)

   Protected Attributes
       PrivateData * d_data

Detailed Description
       A class for spline interpolation.

       The QwtSpline class is used for cubical spline interpolation. Two types
       of splines, natural and periodic, are supported.

       Usage:

	   1.  First call setPoints() to determine the spline coefficients for
	       a tabulated function y(x).
	   2.  After the coefficients have been set up, the interpolated
	       function value for an argument x can be determined by calling
	       QwtSpline::value().
       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;
	   }

Constructor & Destructor Documentation
   QwtSpline::QwtSpline (const QwtSpline &other)
       Copy constructor
       Parameters:
	   other Spline used for initilization
Member Function Documentation
   bool QwtSpline::buildNaturalSpline (const QPolygonF &points) [protected]
       Determines the coefficients for a natural spline. Returns:
	   true if successful
   bool QwtSpline::buildPeriodicSpline (const QPolygonF &points) [protected]
       Determines the coefficients for a periodic spline. Returns:
	   true if successful
   const QwtArray< double > & QwtSpline::coefficientsA () const
       Returns:
	   A coefficients
   const QwtArray< double > & QwtSpline::coefficientsB () const
       Returns:
	   B coefficients
   const QwtArray< double > & QwtSpline::coefficientsC () const
       Returns:
	   C coefficients
   QwtSpline & QwtSpline::operator= (const QwtSpline &other)
       Assignment operator
       Parameters:
	   other Spline used for initilization
   QPolygonF QwtSpline::points () const
       Return points passed by setPoints
   bool QwtSpline::setPoints (const QPolygonF &points)
       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:
	   points Points
       Returns:
	   true if successful
       Warning:
	   The sequence of x (but not y) values has to be strictly monotone
	   increasing, which means points[i].x() < points[i+1].x(). If this is
	   not the case, the function will return false
   void QwtSpline::setSplineType (SplineTypesplineType)
       Select the algorithm used for calculating the spline
       Parameters:
	   splineType Spline type
       See also:
	   splineType()
   QwtSpline::SplineType QwtSpline::splineType () const
       Returns:
	   the spline type
       See also:
	   setSplineType()
   double QwtSpline::value (doublex) const
       Calculate the interpolated function value corresponding to a given
       argument x.

Author
       Generated automatically by Doxygen for Qwt User's Guide from the source
       code.

Version 5.2.3			Tue Nov 20 2012			  QwtSpline(3)
[top]

List of man pages available for DragonFly

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net