Repository navigation
v3.0.0-beta.1
Pre-release
Pre-release
Breaking Changes
- feat!: queries return structs instead of tuples. Query methods have been updated so that they all return
either aNearestNeighbour,Vec<NearestNeighbour>,
orVec<BestNeighbour>, for consistency. - feat!: use a trait instead of a function pointer for distance metrics (See SquaredEuclidean and Manhattan)
- feat: add within_unsorted_iter query
Performance
- perf: refactor within to simply sort the result of within_unsorted.
Previously,withinwas keeping its results in aBinaryHeapand calling
itsinto_sorted_vecmethod to, well, return a sortedVec.
Whilst aBinaryHeapis great if you are frequently adding and removing
items, if your use case is to gradually add all your items, and then sort
them all at once, its quicker to just put things in aVecand then
sort theVecat the end.
Benchmarking shows that this change improves performance by anything from
5 to 60% in practice.