Python implementation of cover trees, near-drop-in replacement for scipy.spatial.kdtree
Switch branches/tags
Nothing to show
Clone or download
Pull request Compare This branch is even with patvarilly:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


This is a Python implementation of cover trees, a data structure for finding
nearest neighbors in a general metric space (e.g., a 3D box with periodic
boundary conditions).

Cover trees are described in two papers hosted here:

The implementation here owes a great deal to PyCoverTree, by Thomas Kollar,
Nil Geisweiller, Emanuele Olivetti, which can be found here:

The API follows that of Anne M. Archibald's KD-tree implementation for scipy
(scipy.spatial.kdtree).  Other than specifying a distance function in the
constructor, this module can be used as a drop-in replacement for kdtree.