VP-tree nearest neighbor search
A relatively simple and readable Rust implementation of Vantage Point tree search algorithm.
The VP tree algorithm doesn't need to know coordinates of items, only distances between them. It can efficiently search multi-dimensional spaces and abstract things as long as you can define similarity between them (e.g. points, colors, and even images).
Please see the API reference or examples for details.
This algorithm does not work with squared distances. When implementing Euclidean distance, you MUST use sqrt(). Vantage Point trees require metric spaces.