goldman.collection.spatial
Interface SpatialCollection<E>

All Superinterfaces:
Collection<E>, Iterable<E>
All Known Implementing Classes:
KDTree, QuadTree

public interface SpatialCollection<E>
extends Collection<E>

A spatial collection organizes its elements by location in a multidimensional space.


Method Summary
 E max(int dimension)
          Returns a greatest element in the collection along the given dimension.
 E min(int dimension)
          Returns a least element in the collection along the given dimension.
 Collection<E> withinBounds(E minCorner, E maxCorner)
          Returns a collection of the elements that fall within (or on) the boundary of the multidimensional box defined by the two given corners, minCorner and maxCorner.
 
Methods inherited from interface goldman.collection.Collection
accept, add, addAll, checkRep, clear, contains, ensureCapacity, getCapacity, getComparator, getEquivalentElement, getLocator, getSize, isEmpty, iterator, remove, retainAll, toArray, toArray, toString, trimToSize
 

Method Detail

max

E max(int dimension)
Returns a greatest element in the collection along the given dimension. This method throws a NoSuchElementException when the collection is empty. It throws an IllegalArgumentException when the given dimension index is not valid for this spatial collection.


min

E min(int dimension)
Returns a least element in the collection along the given dimension. This method throws a NoSuchElementException when the collection is empty. It throws an IllegalArgumentException when the given dimension index is not valid for this spatial collection.


withinBounds

Collection<E> withinBounds(E minCorner,
                           E maxCorner)
Returns a collection of the elements that fall within (or on) the boundary of the multidimensional box defined by the two given corners, minCorner and maxCorner. That is, this method performs an orthogonal range search. It requires that the coordinates of minCorner are less than or equal to those of maxCorner along every dimension of the spatial collection.