Expanded README (better documentation for the methods of KDTree class)
authorDmitriy Morozov <dmitriy@mrzv.org>
Tue, 01 Sep 2009 11:11:18 -0700
changeset 8 ef31983c4dd2
parent 7 fc7a9f78a5db
child 9 0c2b965c8824
Expanded README (better documentation for the methods of KDTree class)
README
--- a/README	Sat Jun 20 13:00:20 2009 -0700
+++ b/README	Tue Sep 01 11:11:18 2009 -0700
@@ -53,6 +53,15 @@
 
 (assuming you are on Linux).    
 
+.. note::
+
+    One can get a distribution of ANN_ with the above patches applied as well as
+    other changes (e.g. reentrant `annkSearch()` method) from my repository:
+        
+        .. parsed-literal::
+        
+            hg clone http://hg.mrzv.org/ANN
+
 .. _gcc43.patch:            http://aur.archlinux.org/packages/ann/ann/gcc43.patch
 .. _shared-libs.patch:      http://aur.archlinux.org/packages/ann/ann/shared-libs.patch
 
@@ -77,10 +86,31 @@
 The main content of pyANN is the class `KDTree`. The class is initialized with a
 list of points, and provides three key methods:
 
-    :kSearch:
-    :kPriSearch:
-    :kFRSearch:
+    `__init__(lst)`
+        Initialize `KDTree` with a list of points (each point is a list of
+        coordinates).
+
+    `kSearch(q,k,eps)`
+        Find `k` nearest neighbors of the query point `q` with an error of `eps`.
+        Returns a pair of lists: `(idxs, dists)`. The first is the list of
+        indices of the nearest neighbors; the second is the list of squared 
+        distances to the corresponding points from the query point.
+        
+    `kPriSearch(q,k,eps)`
+        Same as above using priority search.
 
-Additional auxiliary methods mimick ANN's functionality:
+    `kFRSearch(q, sqRad, k, eps)`
+        Fixed radius search. Find at most `k` nearest neighbors of the query point
+        `q` within radius `sqRad`, with an allowed error of `eps`.
+
+    `__len__()`
+        Returns number of points in the `KDTree`.
 
-    
+    `dim()`
+        Dimensions of the point set.
+
+Additional auxiliary (global) function mimicks ANN's functionality:
+
+    `max_pts_visit(maxPts)`
+        Maximum number of points to visit before terminating (will override
+        larger values of `k` in the above search functions).