checkpoint
[anneal.git] / src / edu / berkeley / qfat / geom / RTree.java
index eaa9f69..cd1d217 100644 (file)
@@ -15,10 +15,17 @@ public class RTree<V extends HasBoundingBox> implements Iterable<V> {
 
     public Iterator<V> iterator() { return vToId.keySet().iterator(); }
 
-    public RTree() {
-        Properties props = new Properties();
+    private static final Properties props = new Properties();
+    static {
         props.put("MinNodeEntries", "1");
         props.put("MaxNodeEntries", "5");
+    }
+
+    public RTree() { clear(); }
+
+    public void clear() {
+        idToV.clear();
+        vToId.clear();
         rtree.init(props);
     }