97 lines
6.8 KiB
HTML
97 lines
6.8 KiB
HTML
|
|
<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
<html><head><title>Python: module geosolver.tolerance</title>
|
|
</head><body bgcolor="#f0f0f8">
|
|
|
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
|
|
<tr bgcolor="#7799ee">
|
|
<td valign=bottom> <br>
|
|
<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong><a href="geosolver.html"><font color="#ffffff">geosolver</font></a>.tolerance</strong></big></big></font></td
|
|
><td align=right valign=bottom
|
|
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/home/rick/Programming/Python/GeoSolver/geosolver/tolerance.py">/home/rick/Programming/Python/GeoSolver/geosolver/tolerance.py</a></font></td></tr></table>
|
|
<p><tt>Basic toleranced comparison functions. Intended for use on double values, <br>
|
|
and extention to positive and negative infinity, represented by <br>
|
|
PosInf and NegInf respectively. <br>
|
|
Note that <a href="#-tol_eq">tol_eq</a>(PosInf,PosInf)=True. This is matematically acceptable<br>
|
|
if we consider PosInf as a single value, greater than any other value that<br>
|
|
can be represented by a computer. Same for NegInf.<br>
|
|
All toleranced comparison function accept a tolerance value. When it is <br>
|
|
ommited or when "Default" is specified, a default value is used. This default<br>
|
|
value is stored in the variable: default_tol.</tt></p>
|
|
<p>
|
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
<tr bgcolor="#ee77aa">
|
|
<td colspan=3 valign=bottom> <br>
|
|
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
|
|
|
|
<tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td>
|
|
<td width="100%"><dl>
|
|
<dt><font face="helvetica, arial"><a href="geosolver.tolerance.html#negativeinfinity">negativeinfinity</a>
|
|
</font></dt><dt><font face="helvetica, arial"><a href="geosolver.tolerance.html#positiveinfinity">positiveinfinity</a>
|
|
</font></dt></dl>
|
|
<p>
|
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
<tr bgcolor="#ffc8d8">
|
|
<td colspan=3 valign=bottom> <br>
|
|
<font color="#000000" face="helvetica, arial"><a name="negativeinfinity">class <strong>negativeinfinity</strong></a></font></td></tr>
|
|
|
|
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
|
|
<td colspan=2><tt>Negative Infinity, a value greater then any other value except itself. <br>
|
|
Only one instance of this class is needed, instantiated in this module as <br>
|
|
NegInf.<br> </tt></td></tr>
|
|
<tr><td> </td>
|
|
<td width="100%">Methods defined here:<br>
|
|
<dl><dt><a name="negativeinfinity-__cmp__"><strong>__cmp__</strong></a>(self, other)</dt></dl>
|
|
|
|
<dl><dt><a name="negativeinfinity-__hash__"><strong>__hash__</strong></a>(self)</dt></dl>
|
|
|
|
<dl><dt><a name="negativeinfinity-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
|
|
|
|
<dl><dt><a name="negativeinfinity-__str__"><strong>__str__</strong></a>(self)</dt></dl>
|
|
|
|
</td></tr></table> <p>
|
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
<tr bgcolor="#ffc8d8">
|
|
<td colspan=3 valign=bottom> <br>
|
|
<font color="#000000" face="helvetica, arial"><a name="positiveinfinity">class <strong>positiveinfinity</strong></a></font></td></tr>
|
|
|
|
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
|
|
<td colspan=2><tt>Positive Infinity, a value greater then any other value except itself. <br>
|
|
Only one instance of this class is needed, instantiated in this module as <br>
|
|
PosInf.<br> </tt></td></tr>
|
|
<tr><td> </td>
|
|
<td width="100%">Methods defined here:<br>
|
|
<dl><dt><a name="positiveinfinity-__cmp__"><strong>__cmp__</strong></a>(self, other)</dt></dl>
|
|
|
|
<dl><dt><a name="positiveinfinity-__hash__"><strong>__hash__</strong></a>(self)</dt></dl>
|
|
|
|
<dl><dt><a name="positiveinfinity-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
|
|
|
|
<dl><dt><a name="positiveinfinity-__str__"><strong>__str__</strong></a>(self)</dt></dl>
|
|
|
|
</td></tr></table></td></tr></table><p>
|
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
<tr bgcolor="#eeaa77">
|
|
<td colspan=3 valign=bottom> <br>
|
|
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
|
|
|
|
<tr><td bgcolor="#eeaa77"><tt> </tt></td><td> </td>
|
|
<td width="100%"><dl><dt><a name="-test"><strong>test</strong></a>()</dt></dl>
|
|
<dl><dt><a name="-tol_compare"><strong>tol_compare</strong></a>(a, b, tol<font color="#909090">='Default'</font>)</dt></dl>
|
|
<dl><dt><a name="-tol_eq"><strong>tol_eq</strong></a>(a, b, tol<font color="#909090">='Default'</font>)</dt><dd><tt>Tolerant equal: return abs(a-b)<=tol</tt></dd></dl>
|
|
<dl><dt><a name="-tol_gt"><strong>tol_gt</strong></a>(a, b, tol<font color="#909090">='Default'</font>)</dt><dd><tt>Tolerant greater-than: return a-b>tol</tt></dd></dl>
|
|
<dl><dt><a name="-tol_gte"><strong>tol_gte</strong></a>(a, b, tol<font color="#909090">='Default'</font>)</dt><dd><tt>Tolerant greater-than-or-equal: return not <a href="#-tol_lt">tol_lt</a>(a,b,tol)</tt></dd></dl>
|
|
<dl><dt><a name="-tol_lt"><strong>tol_lt</strong></a>(a, b, tol<font color="#909090">='Default'</font>)</dt><dd><tt>Tolerant less-than: return b-a>tol</tt></dd></dl>
|
|
<dl><dt><a name="-tol_lte"><strong>tol_lte</strong></a>(a, b, tol<font color="#909090">='Default'</font>)</dt><dd><tt>Tolerant less-than-or-equal: return not <a href="#-tol_gt">tol_gt</a>(a,b,tol)</tt></dd></dl>
|
|
<dl><dt><a name="-tol_round"><strong>tol_round</strong></a>(val, tol<font color="#909090">='Default'</font>)</dt></dl>
|
|
</td></tr></table><p>
|
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
<tr bgcolor="#55aa55">
|
|
<td colspan=3 valign=bottom> <br>
|
|
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
|
|
|
|
<tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td>
|
|
<td width="100%"><strong>NegInf</strong> = geosolver.tolerance.NegInf<br>
|
|
<strong>PosInf</strong> = geosolver.tolerance.PosInf<br>
|
|
<strong>default_tol</strong> = 9.9999999999999995e-07</td></tr></table>
|
|
</body></html> |