checkpoint
[anneal.git] / src / edu / berkeley / qfat / geom / PointSet.java
index b69edb8..f47a8d5 100644 (file)
@@ -1,11 +1,14 @@
 package edu.berkeley.qfat.geom;
 import edu.wlu.cs.levy.CG.KDTree;
+import java.util.*;
 
 public class PointSet<V extends HasPoint> {
 
     private /*final*/ KDTree kd = new KDTree(3);
     private final double[] doubles = new double[3];
 
+    private HashMap<Point,V> exact = new HashMap<Point,V>();
+
     public void clear() {
         kd = new KDTree(3);
     }
@@ -20,6 +23,7 @@ public class PointSet<V extends HasPoint> {
         } catch (Exception e) {
             throw new Error(e);
         }
+        exact.put(p, v);
     }
 
     public void remove(HasPoint v) { remove(v.getPoint()); }
@@ -30,6 +34,7 @@ public class PointSet<V extends HasPoint> {
         try {
             kd.delete(doubles);
         } catch (Exception e) { }
+        exact.remove(p);
     }
 
     public V nearest(Point p) {