
Neartree is an api and a library for finding nearest neighbors among points in spaces of arbitrary dimensions.
the library uses the nearest neighbor algorithm after kalantari and mcdonald, (ieee transactions on software engineering, v. se-9, pp. 631-634,1983) modified to use recursion instead of a double-linked tree and simplified so that it does less checking for things like is the distance to the right less than the distance to the left; it was found that these checks make little to no difference.