Expand description
§flow-knn
Algorithm-agnostic k-nearest-neighbour graphs for large-n scientific data.
Build once with compute_knn, reuse the KnnGraph across embedders
(PaCMAP, UMAP, …) without recomputing neighbours.
Structs§
- Hnsw
Params - Quality / memory trade-off for HNSW indices (usearch or ann-search-rs).
- KnnGraph
- Portable k-nearest-neighbour graph: per-point indices and distances only.
- Neighbor
List - Neighbours of a single query point.
- Perf
Record - One timed cell in the (n, d, method) performance matrix.
- Recommend
Opts - Preferences that bias automatic method choice.
Enums§
- Distance
Metric - Distance metric for the KNN graph.
- KnnError
- KnnMethod
- Approximate / exact nearest-neighbour method.
- Quantization
- Vector quantization for usearch HNSW storage.
Functions§
- builtin_
matrix - Built-in snapshot used when JSONL parse fails.
- compute_
knn - Compute k nearest neighbours for all
npoints in row-majordata. - exact_
knn - Exact k-NN for all
npoints in row-majordata. - load_
matrix - Load matrix: prefer
pathif readable, else the shipped JSONL /builtin_matrix. - parse_
matrix_ jsonl - Parse JSONL text into records (skips blank / comment lines).
- read_
knn_ graph - Read a
KnnGraphpreviously written bywrite_knn_graph. - recommend_
method - Recommend a
KnnMethodfornpoints of dimensiond. - recommend_
method_ with_ matrix - Same as
recommend_methodbut with an explicit matrix (tests / custom datasets). - write_
knn_ graph - Write a
KnnGraphtopath(creates/overwrites the file).