edge_subgraph

Function edge_subgraph 

Source
pub fn edge_subgraph<N, E, Ix>(
    graph: &Graph<N, E, Ix>,
    edges: &[(N, N)],
) -> Graph<N, E, Ix>
where N: Node + Clone + Debug, E: EdgeWeight + Clone, Ix: IndexType,
Expand description

Extracts an edge-induced subgraph

Creates a subgraph containing the specified edges and their endpoints.

§Arguments

  • graph - The input graph
  • edges - The set of edges to include

§Returns

  • A new graph containing the specified edges and their endpoints