<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <title>Qwt User's Guide: QwtWeedingCurveFitter Class Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="doxygen.css" rel="stylesheet" type="text/css"/> </head> <body> <!-- Generated by Doxygen 1.7.3 --> <div id="top"> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">Qwt User's Guide <span id="projectnumber">6.0.1</span></div> </td> </tr> </tbody> </table> </div> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li class="current"><a href="annotated.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</span></a></li> </ul> </div> <div id="navrow2" class="tabs2"> <ul class="tablist"> <li><a href="annotated.html"><span>Class List</span></a></li> <li><a href="classes.html"><span>Class Index</span></a></li> <li><a href="inherits.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Class Members</span></a></li> </ul> </div> </div> <div class="header"> <div class="summary"> <a href="#pub-methods">Public Member Functions</a> </div> <div class="headertitle"> <h1>QwtWeedingCurveFitter Class Reference</h1> </div> </div> <div class="contents"> <!-- doxytag: class="QwtWeedingCurveFitter" --><!-- doxytag: inherits="QwtCurveFitter" --> <p>A curve fitter implementing Douglas and Peucker algorithm. <a href="#_details">More...</a></p> <p><code>#include <<a class="el" href="qwt__curve__fitter_8h_source.html">qwt_curve_fitter.h</a>></code></p> <div class="dynheader"> Inheritance diagram for QwtWeedingCurveFitter:</div> <div class="dyncontent"> <div class="center"><img src="class_qwt_weeding_curve_fitter__inherit__graph.png" border="0" usemap="#_qwt_weeding_curve_fitter_inherit__map" alt="Inheritance graph"/></div> <map name="_qwt_weeding_curve_fitter_inherit__map" id="_qwt_weeding_curve_fitter_inherit__map"> <area shape="rect" id="node2" href="class_qwt_curve_fitter.html" title="Abstract base class for a curve fitter." alt="" coords="31,5,137,35"/></map> <center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div> <p><a href="class_qwt_weeding_curve_fitter-members.html">List of all members.</a></p> <table class="memberdecls"> <tr><td colspan="2"><h2><a name="pub-methods"></a> Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual QPolygonF </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_weeding_curve_fitter.html#aa316dc6c60ae0d0c74ef0bc0fc239f0b">fitCurve</a> (const QPolygonF &) const </td></tr> <tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_weeding_curve_fitter.html#a7deb4d070a329cbdee454023194898a7">QwtWeedingCurveFitter</a> (double tolerance=1.0)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_weeding_curve_fitter.html#a62c303f6826fef2be7b7bbe82f530680">setTolerance</a> (double)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_weeding_curve_fitter.html#aa2e69ce083d02c4da0d669a082a15187">tolerance</a> () const </td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_weeding_curve_fitter.html#abbd30a948fc6974f881678f80a29768c">~QwtWeedingCurveFitter</a> ()</td></tr> </table> <hr/><a name="_details"></a><h2>Detailed Description</h2> <div class="textblock"><p>A curve fitter implementing Douglas and Peucker algorithm. </p> <p>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.</p> <p>The smoothed curve consists of a subset of the points that defined the original curve.</p> <p>In opposite to <a class="el" href="class_qwt_spline_curve_fitter.html" title="A curve fitter using cubic splines.">QwtSplineCurveFitter</a> the Douglas and Peucker algorithm reduces the number of points. By adjusting the tolerance parameter according to the axis scales <a class="el" href="class_qwt_spline_curve_fitter.html" title="A curve fitter using cubic splines.">QwtSplineCurveFitter</a> can be used to implement different level of details to speed up painting of curves of many points. </p> </div><hr/><h2>Constructor & Destructor Documentation</h2> <a class="anchor" id="a7deb4d070a329cbdee454023194898a7"></a><!-- doxytag: member="QwtWeedingCurveFitter::QwtWeedingCurveFitter" ref="a7deb4d070a329cbdee454023194898a7" args="(double tolerance=1.0)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">QwtWeedingCurveFitter::QwtWeedingCurveFitter </td> <td>(</td> <td class="paramtype">double </td> <td class="paramname"><em>tolerance</em> = <code>1.0</code></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Constructor</p> <dl><dt><b>Parameters:</b></dt><dd> <table class="params"> <tr><td class="paramname">tolerance</td><td>Tolerance </td></tr> </table> </dd> </dl> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="class_qwt_weeding_curve_fitter.html#a62c303f6826fef2be7b7bbe82f530680">setTolerance()</a>, <a class="el" href="class_qwt_weeding_curve_fitter.html#aa2e69ce083d02c4da0d669a082a15187">tolerance()</a> </dd></dl> </div> </div> <a class="anchor" id="abbd30a948fc6974f881678f80a29768c"></a><!-- doxytag: member="QwtWeedingCurveFitter::~QwtWeedingCurveFitter" ref="abbd30a948fc6974f881678f80a29768c" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">QwtWeedingCurveFitter::~QwtWeedingCurveFitter </td> <td>(</td> <td class="paramname"></td><td>)</td> <td><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Destructor. </p> </div> </div> <hr/><h2>Member Function Documentation</h2> <a class="anchor" id="aa316dc6c60ae0d0c74ef0bc0fc239f0b"></a><!-- doxytag: member="QwtWeedingCurveFitter::fitCurve" ref="aa316dc6c60ae0d0c74ef0bc0fc239f0b" args="(const QPolygonF &) const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">QPolygonF QwtWeedingCurveFitter::fitCurve </td> <td>(</td> <td class="paramtype">const QPolygonF & </td> <td class="paramname"><em>points</em></td><td>)</td> <td> const<code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <dl><dt><b>Parameters:</b></dt><dd> <table class="params"> <tr><td class="paramname">points</td><td>Series of data points </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>Curve points </dd></dl> <p>Implements <a class="el" href="class_qwt_curve_fitter.html#afa9bf5b328aa553229e204533a60fec0">QwtCurveFitter</a>.</p> </div> </div> <a class="anchor" id="a62c303f6826fef2be7b7bbe82f530680"></a><!-- doxytag: member="QwtWeedingCurveFitter::setTolerance" ref="a62c303f6826fef2be7b7bbe82f530680" args="(double)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void QwtWeedingCurveFitter::setTolerance </td> <td>(</td> <td class="paramtype">double </td> <td class="paramname"><em>tolerance</em></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Assign the tolerance</p> <p>The tolerance is the maximum distance, that is accaptable between the original curve and the smoothed curve.</p> <p>Increasing the tolerance will reduce the number of the resulting points.</p> <dl><dt><b>Parameters:</b></dt><dd> <table class="params"> <tr><td class="paramname">tolerance</td><td>Tolerance</td></tr> </table> </dd> </dl> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="class_qwt_weeding_curve_fitter.html#aa2e69ce083d02c4da0d669a082a15187">tolerance()</a> </dd></dl> </div> </div> <a class="anchor" id="aa2e69ce083d02c4da0d669a082a15187"></a><!-- doxytag: member="QwtWeedingCurveFitter::tolerance" ref="aa2e69ce083d02c4da0d669a082a15187" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">double QwtWeedingCurveFitter::tolerance </td> <td>(</td> <td class="paramname"></td><td>)</td> <td> const</td> </tr> </table> </div> <div class="memdoc"> <dl class="return"><dt><b>Returns:</b></dt><dd>Tolerance </dd></dl> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="class_qwt_weeding_curve_fitter.html#a62c303f6826fef2be7b7bbe82f530680">setTolerance()</a> </dd></dl> </div> </div> </div> <hr class="footer"/><address class="footer"><small>Generated by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </small></address> </body> </html>