Skip to main content

Module graph

Module graph 

Source
Expand description

chunk-to-chunk graph runtime (G1). mirrors ann: a flat csr is parsed off the graph_adjacency (0x0C) section at open time and walked with zero allocation. bounded_bfs GENERATES candidate chunk ordinals seeded from the exact-cosine top-k; the candidates are handed to the SAME mandatory exact rerank (score_subset) so a graph edge can never leak into a returned score. recall stays f32::NAN (we never lie).

Structs§

CsrIndex
flat csr adjacency over chunk ordinals. offsets[node..node+1] bounds node’s run in neighbors (and edge_types), so one node’s neighbors are a contiguous &[u32] slice.
Traversal
reusable traversal scratch. allocate once per CsrIndex, reuse across queries; bounded_bfs bumps the generation so stale stamps read as unvisited without clearing the buffer.