Note

This documents the development version of NetworkX. Documentation for the current release can be found here.

# networkx.algorithms.connectivity.edge_kcomponents.k_edge_subgraphs¶

k_edge_subgraphs(G, k)[source]

Generates nodes in each maximal k-edge-connected subgraph in G.

Parameters
• G (NetworkX graph)

• k (Integer) – Desired edge connectivity

Returns

k_edge_subgraphs – Each k-edge-subgraph is a maximal set of nodes that defines a subgraph of G that is k-edge-connected.

Return type

a generator of k-edge-subgraphs

edge_connectivity()

k_edge_components()

similar to this function, but nodes only need to have k-edge-connctivity within the graph G and the subgraphs might not be k-edge-connected.

Raises

Notes

Attempts to use the most efficient implementation available based on k. If k=1, or k=2 and the graph is undirected, then this simply calls k_edge_components. Otherwise the algorithm from _[1] is used.

Example

>>> import itertools as it
>>> from networkx.utils import pairwise
>>> paths = [
...     (1, 2, 4, 3, 1, 4),
...     (5, 6, 7, 8, 5, 7, 8, 6),
... ]
>>> G = nx.Graph()