package Minor.P3.DS; import java.util.Vector; public class prQuadtree< T extends Compare2D > { abstract class prQuadNode { } class prQuadLeaf extends prQuadNode { public Vector Elements; } class prQuadInternal extends prQuadNode { public prQuadNode NW, SW, SE, NE; } prQuadNode root; long xMin, xMax, yMin, yMax; // Initialize quadtree to empty state. public prQuadtree(long xMin, long xMax, long yMin, long yMax) { } // Pre: elem != null // Post: If elem lies within the tree's region, and elem is not already // present in the tree, elem has been inserted into the tree. // Return true iff elem is inserted into the tree. public boolean insert(T elem) { } // Pre: elem != null // Returns reference to an element x within the tree such that elem.equals(x) // is true, provided such a matching element occurs within the tree; returns // null otherwise. public T find(T Elem) { } // Pre: xLo, xHi, yLo and yHi define a rectangular region // Returns a collection of (references to) all elements x such that x is in // the tree and x lies at coordinates within the defined rectangular region, // including the boundary of the region. public Vector find(long xLo, long xHi, long yLo, long yHi) { } }