Output of the two-pass edge construction: the final damped, deduped,
per-source-capped edge set plus the full pre-cap category table and
cap stats derived from pass-1 counters.
A single node-interned edge. 24 bytes instead of a string-keyed
hashmap entry — the difference between ~400 MB and several GB on
multi-million-edge repositories (vendored Go monorepos, vscode),
which is what used to OOM-kill memory-limited benchmark runners.
Node-interned edge list: the memory-bounded intermediate between
edge collection and graph construction. idx_to_node is the sorted,
deduplicated fragment-id universe, so CSR node indexing built from it
is identical to the ordering Graph::freeze produces.
Statistics from the per-source out-edge cap that runs in
build_graph after apply_hub_suppression. Surfaced to Python
via LatencyBreakdown so calibration runs can quantify how often
the cap fires and how many edges it discards.
Compact (src, dst) -> category lookup over the pre-cap edge set.
Replaces the FragmentId-pair-keyed hashmap that used to retain the
full uncapped edge universe for the lifetime of the pipeline.
Candidate out-edge ranked by post-suppression weight. The ordering
replicates the sort in cap_out_edges_per_source (descending weight,
ties by ascending dst index), so a bounded min-heap of these keeps
exactly the edges the full sort-and-truncate would keep.
Hub-suppression damping factors, precomputed from dedup-aware degree
counters so the damped weight of any edge can be evaluated without
materializing the edge universe. The per-edge arithmetic is identical
to the historical in-place suppression loops: at most one division,
by ln(1+in_degree) for non-exempt edges into hub destinations or by
sqrt(fan) for Semantic edges out of wide-fan sources.
Map-based adapter kept for tests and small callers; converts to the
compact representation and delegates. Edges whose endpoints are not
in fragments are dropped (the hashmap path silently dropped them
at CSR construction).
Graph-construction path for pre-capped edges from the two-pass
pipeline: suppression and the per-source cap already ran, so only
the category table and CSR assembly remain.
Materialized-edge construction path kept for the map-based adapter
and small callers: hub suppression, per-source cap, and CSR assembly
all run on the interned edge array.
Merge duplicate (src, dst) entries: weight = max across duplicates,
category = first occurrence in input order (builder order), matching
the historical EdgeDict max-merge + or_insert category semantics.
Requires a stable sort so first-in-input stays first-in-group.