Skip to main content

Module knn

Module knn 

Source
Expand description

K-nearest-neighbour search for PaCMAP graph construction.

Returns, for each point i, its k nearest neighbours by the chosen metric, along with their distances — both used in the scaled-distance reranking step and for sigma computation (avg distance to 4th–6th neighbours).

Structs§

NeighborList
KNN result for a single query point.

Functions§

compute_knn
Compute k nearest neighbours for all n points in data (n×d row-major).
exact_knn