summaryrefslogtreecommitdiffstats
path: root/Algorithms/Part-I/5-KdTrees/PointSET.java
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2013-03-26 07:54:25 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2013-11-15 17:38:44 +0100
commit2d3ca27255ce0433cb2af74f5e10b60fc0651d91 (patch)
tree3ac768ad5d45322200653cef369eb80408c9c10a /Algorithms/Part-I/5-KdTrees/PointSET.java
parentc492158417199a42314eb34fe6198e33e5b46db4 (diff)
downloadcoursera-2d3ca27255ce0433cb2af74f5e10b60fc0651d91.zip
coursera-2d3ca27255ce0433cb2af74f5e10b60fc0651d91.tar.gz
Algorithms-I : 5-KdTrees: added, to be completed
Diffstat (limited to 'Algorithms/Part-I/5-KdTrees/PointSET.java')
-rw-r--r--Algorithms/Part-I/5-KdTrees/PointSET.java50
1 files changed, 50 insertions, 0 deletions
diff --git a/Algorithms/Part-I/5-KdTrees/PointSET.java b/Algorithms/Part-I/5-KdTrees/PointSET.java
new file mode 100644
index 0000000..aabceff
--- /dev/null
+++ b/Algorithms/Part-I/5-KdTrees/PointSET.java
@@ -0,0 +1,50 @@
+/* vim: set expandtab tabstop=4 shiftwidth=4 : */
+
+public class PointSET
+{
+ // construct an empty set of points
+ public PointSET()
+ {
+ }
+
+ // is the set empty?
+ public boolean isEmpty()
+ {
+ return true;
+ }
+
+ // number of points in the set
+ public int size()
+ {
+ return 0;
+ }
+
+ // add the point p to the set (if it is not already in the set)
+ public void insert(Point2D p)
+ {
+ }
+
+ // does the set contain the point p?
+ public boolean contains(Point2D p)
+ {
+ return false;
+ }
+
+ // draw all of the points to standard draw
+ public void draw()
+ {
+ }
+
+ // all points in the set that are inside the rectangle
+ public Iterable<Point2D> range(RectHV rect)
+ {
+ return null;
+ }
+
+ // a nearest neighbor in the set to p; null if set is empty
+ public Point2D nearest(Point2D p)
+ {
+ return null;
+ }
+}
+