rangesearch.api
Interface RangeTree2D

All Known Implementing Classes:
RangeTree2DImpl

public interface RangeTree2D

An interface describing a two level range tree for 2D range over 2D points.


Method Summary
 void initialize(jdsl.core.api.ObjectIterator oi, jdsl.core.api.Comparator comp1, jdsl.core.api.Comparator comp2)
          Initializes the range tree to the given set of elements, with the given comparators.
 jdsl.core.api.ObjectIterator query(java.lang.Object start1, java.lang.Object end1, java.lang.Object start2, java.lang.Object end2)
          Queries the elements used to initialize the range tree and returns an iterator over the objects within the bounds given.
 

Method Detail

initialize

public void initialize(jdsl.core.api.ObjectIterator oi,
                       jdsl.core.api.Comparator comp1,
                       jdsl.core.api.Comparator comp2)
Initializes the range tree to the given set of elements, with the given comparators.

Parameters:
comp1 - this defines how items will be compared in one dimension of the search and defines the primary level of the range tree
comp2 - this defines how items will be compared in the second dimension of the search and defines the secondary level of the range tree

query

public jdsl.core.api.ObjectIterator query(java.lang.Object start1,
                                          java.lang.Object end1,
                                          java.lang.Object start2,
                                          java.lang.Object end2)
                                   throws RangeSearchException
Queries the elements used to initialize the range tree and returns an iterator over the objects within the bounds given.

Parameters:
start1 - the element defining the lower bound for the primary structure.
end1 - the element defining the upper bound for the primary structure.
start2 - the element defining the lower bound for the secondary structure.
end2 - the element defining the upper bound for the secondary structure.
Returns:
an iterator over the elements in the given ranges.
Throws:
RangeSearchException - if either start variable is above its respective end variable or if the input objects cannot be compared with the data