ponca
ponca copied to clipboard
KnnQueries with `KnnGraph`
In the current version, the KnnGraph restrict KnnQueries with k
the number of neighbors used to construct the graph.
In the general setting, we need to have a KnnQuery with arbitrary values of k
.
I suggest that we add a query that does a region growing (as with the RangeQuery) but that stops when getting the k closest neighbors. When need to keep the current implementation as it provides fast access for this specific query. Smaller k could be also accelerated this way by sorting the neighbor indices by distance.