
This is a port of an approximate nearest-neighbor algorithm from
Java to Objective Caml.  It's somewhat less than 400 lines of code.
It adds a tree-balancing heuristic which seems to improve the
approximation, although I don't have any bounds on how well it
does, approximate, random, or otherwise.

I haven't compared its speed to the Java implementation.  There are
several places where it could cache distance measurements, but doesn't,
so it certainly could be made faster.

Copyright 2003, Josh T. Burdick.  Distributed under the GNU
Lesser General Public License, available at
http://www.fsf.org/licenses/lgpl.html

Josh Burdick
jburdick@gradient.cis.upenn.edu
http://www.cis.upenn.edu/~jburdick

