(Point2D p)
| 34 | |
| 35 | // add the point to the set (if it is not already in the set) |
| 36 | public void insert(Point2D p) { |
| 37 | if (p == null) throw new IllegalArgumentException(); |
| 38 | if (contains(p)) return; |
| 39 | root = put(root, p, true, 0, 0, 1, 1); |
| 40 | n++; |
| 41 | } |
| 42 | |
| 43 | private Node put(Node x, Point2D p, boolean isXPartition, double xmin, double ymin, double xmax, |
| 44 | double ymax) { |