Function decompose_weakly_connected_components_with_mappings

Source
pub fn decompose_weakly_connected_components_with_mappings<Graph: Default + DynamicGraph>(
    graph: &Graph,
) -> Vec<(Graph, Vec<Graph::NodeIndex>, Vec<Graph::EdgeIndex>)>
where Graph::NodeData: Clone, Graph::EdgeData: Clone,
Expand description

Returns the weakly connected components of a graph.

Also returns a mapping from node indices in the WCCs to node indices in the source graph, and a mapping from edge indices in the WCCs to edge indices in the source graph.

If the graph is empty, no WCCs are returned. Otherwise, the WCCs are cloned into new graphs, without preserving the node or edge indices.