Open JosiahParry opened 11 months ago
I think you are looking for nearest_neighbor_iter
. nearest_neighbors
is meant only for when there is no single nearest neighbour but multiple objects have exactly the same distance as quoted from the documentation.
Thanks for the response @adamreichold! That might be what I need. I still think the documentation can be improved, howevre.
https://github.com/georust/rstar/blob/0ed77481c6e8a77454edff6b303afb6fa062c0c6/rstar/src/rtree.rs#L681
The nearest_neighbors() method seems like it can be usefull for KNN however it is not immediately clear in the docs how it works. Does it return a vector of all neighboring points sorted by distance?
Can this method be clarified further?