cs252proj.api
Interface PrioritySearchTree

All Superinterfaces:
jdsl.core.api.Container, jdsl.core.api.InspectableContainer, jdsl.core.api.InspectableKeyBasedContainer, jdsl.core.api.KeyBasedContainer

public interface PrioritySearchTree
extends jdsl.core.api.KeyBasedContainer

An interface for a collection upon which three-sided queries can be performed. The positive Y axis is the open direction of the three-sided queries. Must be a KeyBasedContainer with Point2Ds stored as the keys, or ClassCastException or InvalidKeyException may be thrown for some operations.


Method Summary
 jdsl.core.api.LocatorIterator threeSidedQuery(jdsl.geomobj.api.Point2D p1, jdsl.geomobj.api.Point2D p2)
          Finds the Point2D-element pairs within the given three-sided range.
 
Methods inherited from interface jdsl.core.api.KeyBasedContainer
insert, remove, replaceKey
 
Methods inherited from interface jdsl.core.api.InspectableKeyBasedContainer
keys, locators
 
Methods inherited from interface jdsl.core.api.InspectableContainer
contains, elements, isEmpty, size
 
Methods inherited from interface jdsl.core.api.Container
newContainer, replaceElement
 

Method Detail

threeSidedQuery

public jdsl.core.api.LocatorIterator threeSidedQuery(jdsl.geomobj.api.Point2D p1,
                                                     jdsl.geomobj.api.Point2D p2)
                                              throws java.lang.IllegalArgumentException
Finds the Point2D-element pairs within the given three-sided range.
Parameters:
p1 - the lower-left point of the range.
p2 - the lower-right point of the range.
Returns:
an iterator over the points within the three-sided range. Points coinciding with range boundary are considered to be within the range.
Throws:
java.lang.IllegalArgumentException - if p1 has a greater X coordinate than p2 or if p1 and p2 do not have the same Y coordinate.