rangesearch.ref
Class RangeSearch2DImpl
java.lang.Object
rangesearch.ref.RangeSearch2DImpl
- All Implemented Interfaces:
- RangeSearch2D
- public class RangeSearch2DImpl
- extends java.lang.Object
- implements RangeSearch2D
An implementation of the RangeSearch2D structure using a range tree.
Method Summary |
void |
initialize(Point2DIterator pi)
Initializes the range searcher with the given set of points. |
Point2DIterator |
query(jdsl.geomobj.api.Rectangle2D r)
Queries the current set of points using the query rectangle r. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
m_rangeTree
protected RangeTree2D m_rangeTree
m_tester
protected jdsl.geomobj.api.GeomTester2D m_tester
RangeSearch2DImpl
public RangeSearch2DImpl(jdsl.geomobj.api.GeomTester2D tester)
- Parameters:
tester
- the geometric tester to use for point/rectangle
comparisions.
initialize
public void initialize(Point2DIterator pi)
throws RangeSearchException
- Initializes the range searcher with the given set of points.
- Specified by:
initialize
in interface RangeSearch2D
- Parameters:
pi
- an iterator over the points to be searched.
- Throws:
RangeSearchException
- if points can't be compared properly.
query
public Point2DIterator query(jdsl.geomobj.api.Rectangle2D r)
throws RangeSearchException
- Queries the current set of points using the query rectangle r.
Points are considered to be within the query rectangle if they lie on or
within the rectangle's borders.
- Specified by:
query
in interface RangeSearch2D
- Parameters:
r
- the rectangle in which to query.
- Throws:
RangeSearchException
- if points can't be compared properly.