Skip to content

Commit 08991e2

Browse files
committed
docs(graph): diagram robust prune state flow
1 parent a7e26f6 commit 08991e2

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

diskann/src/graph/prune.rs

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,30 @@
1515
//! 4. writes selected IDs to the output adjacency list; and
1616
//! 5. optionally fills unused degree slots from the original pool.
1717
//!
18+
//! ```text
19+
//! sorted source-distance pool ──> lookup cache + State[]
20+
//! │
21+
//! alpha = 1.0 ────────┤
22+
//! v
23+
//! scan/resume candidate cursors
24+
//! │
25+
//! alpha *= min(target, 1.2)
26+
//! │
27+
//! v
28+
//! selected prefix
29+
//! │
30+
//! optional ordered saturation
31+
//! v
32+
//! adjacency output
33+
//! ```
34+
//!
35+
//! | Candidate state | Meaning on the next alpha round |
36+
//! | --- | --- |
37+
//! | `occlude_factor > alpha` | skip until a later, permissive round |
38+
//! | `last_checked < found` | resume with the first unseen selected neighbor |
39+
//! | `occlude_factor == f32::MAX` | selected, excluded, or unavailable; never revisit |
40+
//! | selected prefix entry | `neighbor` indexes the original sorted pool |
41+
//!
1842
//! Keeping lookup outside this module lets asynchronous providers fetch before
1943
//! entering the synchronous state machine, while in-memory builders can pass
2044
//! borrowed rows without copying provider policy into the algorithm.

0 commit comments

Comments
 (0)