Function traitgraph::algo::components::extract_subgraphs_from_node_mapping [−][src]
pub fn extract_subgraphs_from_node_mapping<Graph: Default + MutableGraphContainer + StaticGraph>(
graph: &Graph,
node_mapping: &[Graph::NodeIndex]
) -> Vec<Graph> where
Graph::NodeData: Clone,
Graph::EdgeData: Clone,
Expand description
Extract the subgraphs of the given graph according to the given node_mapping.
The node indices of the graph are assumed to match the indices of the vector given as node mapping. The return value is a vector of graphs of which each is the induced subgraph of a set of nodes with the same mapped value.