rustworkx.PyDAG.edge_subgraphΒΆ
- PyDAG.edge_subgraph(edge_list, /)ΒΆ
Return a new PyDiGraph object for an edge induced subgraph of this graph
The induced subgraph contains each edge in edge_list and each node incident to any of those edges.
- Parameters:
edge_list (list[tuple[int, int]]) β A list of edge tuples (2-tuples with the source and target node) to generate the subgraph from. In cases of parallel edges for a multigraph all edges between the specified node. In case of an edge specified that doesnβt exist in the graph it will be silently ignored.
- Returns:
The edge subgraph
- Return type: