NearestNeighbors.jl icon indicating copy to clipboard operation
NearestNeighbors.jl copied to clipboard

Made the result idxs and dists datatypes selectable

Open n6171028 opened this issue 2 years ago • 1 comments

This changeset enables the user to choose the return data type from the knn function

n6171028 avatar Jul 06 '23 03:07 n6171028

Sorry, I merged some stuff that conflicts with this. For the distances, I think it is ok to do what we currently do and let the input points determine the distance type. Is it really needed to get the distances in e.g. a lower precision than what you tree is built with?

For the integer type I agree it is a good idea to specify it. An alternative to this is to reduce the integer type to the smallest that could fit any index into the input data set. That would make things type unstable though.. But maybe with union splitting it is fine.

KristofferC avatar Nov 29 '23 18:11 KristofferC