Provided by: libqwt-doc_6.0.0-1ubuntu1_all

**NAME**

QwtWeedingCurveFitter - A curve fitter implementing Douglas and Peucker algorithm.

**SYNOPSIS**

#include <qwt_curve_fitter.h> InheritsQwtCurveFitter.PublicMemberFunctionsQwtWeedingCurveFitter(double tolerance=1.0) virtual~QwtWeedingCurveFitter() voidsetTolerance(double) doubletolerance() const virtual QPolygonFfitCurve(const QPolygonF &) const

**Detailed** **Description**

A curve fitter implementing Douglas and Peucker algorithm. The purpose of the Douglas and Peucker algorithm is that given a 'curve' composed of line segments to find a curve not too dissimilar but that has fewer points. The algorithm defines 'too dissimilar' based on the maximum distance (tolerance) between the original curve and the smoothed curve. The smoothed curve consists of a subset of the points that defined the original curve. In opposite toQwtSplineCurveFitterthe Douglas and Peucker algorithm reduces the number of points. By adjusting the tolerance parameter according to the axis scalesQwtSplineCurveFittercan be used to implement different level of details to speed up painting of curves of many points.

**Constructor** **&** **Destructor** **Documentation**

QwtWeedingCurveFitter::QwtWeedingCurveFitter(doubletolerance=1.0)ConstructorParameters:toleranceToleranceSeealso:setTolerance(),tolerance()QwtWeedingCurveFitter::~QwtWeedingCurveFitter()[virtual]Destructor.

**Member** **Function** **Documentation**

QPolygonFQwtWeedingCurveFitter::fitCurve(constQPolygonF&points)const[virtual]Parameters:pointsSeries of data pointsReturns:Curve points ImplementsQwtCurveFitter.voidQwtWeedingCurveFitter::setTolerance(doubletolerance)AssignthetoleranceThe tolerance is the maximum distance, that is accaptable between the original curve and the smoothed curve. Increasing the tolerance will reduce the number of the resulting points.Parameters:toleranceToleranceSeealso:tolerance()doubleQwtWeedingCurveFitter::tolerance()constReturns:ToleranceSeealso:setTolerance()

**Author**

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