rustworkx.bridges#
- bridges(graph, /)#
Return the bridges of an undirected graph.
A bridge is any edge whose removal increases the number of connected components of a graph.
Note
The function implicitly assumes that there are no parallel edges or self loops. It may produce incorrect/unexpected results if the input graph has self loops or parallel edges.
- Parameters:
PyGraph – The undirected graph to be used.
- Returns:
A set with edges of the bridges in the graph, each edge is represented by a pair of node index.
- Return type:
set