rangesearch.api
Interface RangeSearch2D

All Known Implementing Classes:
BruteForceRangeSearch2D, RangeSearch2DImpl

public interface RangeSearch2D

An interface describing search over a set of 2D points and returns those points within a rectangle.


Method Summary
 void initialize(Point2DIterator pi)
          Initializes the range searcher with a given set of points.
 Point2DIterator query(jdsl.geomobj.api.Rectangle2D r)
          Queries the current set of points using the query rectangle r.
 

Method Detail

initialize

public void initialize(Point2DIterator pi)
                throws RangeSearchException
Initializes the range searcher with a given set of points.

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.

Parameters:
r - the rectangle in which to query.
Throws:
RangeSearchException - if points can't be compared properly.