Skip to main content

complement_edges

Function complement_edges 

Source
pub fn complement_edges(graph: &Graph) -> Vec<(String, String)>
Expand description

Like complement but returns just the list of new (u, v) edge pairs (in canonical insertion order) without materializing a fresh Graph. Lets the PyO3 binding skip a duplicate insertion pass: previously the binding called this fn, walked the result graph’s edges, and re-inserted each into a PyGraph — twice the per-edge runtime_policy.record overhead, which dominates for dense complements (BA500: 130 ms in nx, ~860 ms in fnx).