Note
This is the documentation for the current state of the development branch of rustworkx. The documentation or APIs here can change prior to being released.
rustworkx.PyDiGraph.edge_subgraph#
- PyDiGraph.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) – 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: