Skip to contents

Main interface

Find approximate neighbors or build and query an index.

rnnd_knn()
Find approximate nearest neighbors
rnnd_build()
Build approximate nearest neighbors index and neighbor graph
rnnd_query()
Query an index for approximate nearest neighbors

Individual search methods

Find or query neighbors using brute force, random selection, nearest neighbor descent, or random projection forests.

brute_force_knn()
Find exact nearest neighbors by brute force
brute_force_knn_query()
Query exact nearest neighbors by brute force
random_knn()
Find nearest neighbors by random selection
random_knn_query()
Query nearest neighbors by random selection
nnd_knn()
Find nearest neighbors using nearest neighbor descent
rpf_knn()
Find nearest neighbors using a random projection forest
rpf_build()
Create a random projection forest nearest neighbor index
rpf_knn_query()
Query a random projection forest index for nearest neighbors
rpf_filter()
Keep the best trees in a random projection forest

Graph search and utilities

Prepare and query search graphs, merge neighbor graphs, and assess their properties.

prepare_search_graph()
Convert a nearest neighbor graph into a search graph
graph_knn_query()
Query a search graph for nearest neighbors
merge_knn()
Merge multiple approximate nearest neighbors graphs
k_occur()
Quantify hubness of a nearest neighbor graph
neighbor_overlap()
Overlap between the indices of two nearest neighbor graphs
truncate_knn() sort_knn() remove_self_knn() self_first_knn()
Manipulate nearest neighbor graphs
knn_to_sparse()
Convert a neighbor graph to a sparse matrix
knn_distances()
Calculate distances for fixed neighbor indices