geos::index::quadtree::IntervalSize Class Reference

Provides a test for whether an interval is so small it should be considered as zero for the purposes of inserting it into a binary tree. More...

#include <geos/indexQuadtree.h>

List of all members.

Static Public Member Functions

static bool isZeroWidth (double min, double max)

Static Public Attributes

static const int MIN_BINARY_EXPONENT = -50


Detailed Description

Provides a test for whether an interval is so small it should be considered as zero for the purposes of inserting it into a binary tree.

The reason this check is necessary is that round-off error can cause the algorithm used to subdivide an interval to fail, by computing a midpoint value which does not lie strictly between the endpoints.


Member Data Documentation

const int geos::index::quadtree::IntervalSize::MIN_BINARY_EXPONENT = -50 [static]

This value is chosen to be a few powers of 2 less than the number of bits available in the double representation (i.e. 53). This should allow enough extra precision for simple computations to be correct, at least for comparison purposes.


The documentation for this class was generated from the following file:
Generated on Fri Mar 27 04:53:38 2009 for GEOS by  doxygen 1.5.4