1 package edu.berkeley.qfat.geom;
2 import edu.wlu.cs.levy.CG.KDTree;
4 public class PointSet<V extends HasPoint> {
6 private /*final*/ KDTree kd = new KDTree(3);
7 private final double[] doubles = new double[3];
13 public void add(V v) {
14 Point p = v.getPoint();
19 kd.insert(doubles, v);
20 } catch (Exception e) {
25 public void remove(HasPoint v) { remove(v.getPoint()); }
26 public void remove(Point p) {
32 } catch (Exception e) { }
35 public V nearest(Point p) {
41 results = kd.nearest(doubles,1);
42 } catch (Exception e) {