Skip to main content

Module graph

Module graph 

Source
Expand description

HNSW graph structure — nodes, parameters, core index operations.

Production implementation per Malkov & Yashunin (2018). FP32 construction for structural integrity; heuristic neighbor selection.

Structs§

Candidate
Ordered candidate for priority queues during search and construction.
HnswIndex
Hierarchical Navigable Small World graph index.
HnswParams
HNSW index parameters shared between Origin and Lite.
Node
A node in the HNSW graph.
SearchResult
Result of a k-NN search.
Xorshift64
Lightweight xorshift64 PRNG for layer assignment.

Constants§

MAX_LAYER_CAP
Hard cap on the layer assigned to any node during insertion. Standard HNSW practice — prevents pathological RNG draws from inflating max_layer and slowing every subsequent search.