networkx.algorithms.connectivity.edge_kcomponents.bridge_components¶

bridge_components
(G)[source]¶ Finds all bridgeconnected components G.
Parameters: G (NetworkX undirected graph) Returns: bridge_components Return type: a generator of 2edgeconnected components See also
k_edge_subgraphs()
 this function is a special case for an undirected graph where k=2.
biconnected_components()
 similar to this function, but is defined using 2nodeconnectivity instead of 2edgeconnectivity.
Raises: NetworkXNotImplemented: – If the input graph is directed or a multigraph. Notes
Bridgeconnected components are also known as 2edgeconnected components.
Example
>>> # The barbell graph with parameter zero has a single bridge >>> G = nx.barbell_graph(5, 0) >>> from networkx.algorithms.connectivity.edge_kcomponents import bridge_components >>> sorted(map(sorted, bridge_components(G))) [[0, 1, 2, 3, 4], [5, 6, 7, 8, 9]]