Skip to main content

complement_edges_indices

Function complement_edges_indices 

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

Return the complement of a graph.

The complement G’ has the same nodes as G but has edges where G does not (and vice versa). Self-loops are not included. Like complement but returns just the list of new (u, v) edge index pairs (in canonical insertion order) without materializing a fresh Graph.