vptree is a port of Steve Hanov's C++
implementation of Vantage-point
trees to the Go programming
language. Vantage-point trees are useful for nearest-neighbour searches in
high-dimensional metric spaces.
It has been customized to search specifically for Items consisting of a 64-bit
signature and an string ID using Hamming distance as the distance measure.
New creates a new VP-tree using the metric and items provided. The metric
measures the distance between two items, so that the VP-tree can find the
nearest neighbour(s) of a target item.
Search searches the VP-tree for the k nearest neighbours of target. It
returns the up to k narest neighbours and the corresponding distances in
order of least distance to largest distance.