Warning

This documents an unmaintained version of NetworkX. Please upgrade to a maintained version and see the current NetworkX documentation.

# networkx.algorithms.connectivity.edge_kcomponents.k_edge_components¶

k_edge_components(G, k)[source]

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

Parameters: G (NetworkX graph) k (Integer) – Desired edge connectivity k_edge_components – will have k-edge-connectivity in the graph G. a generator of k-edge-ccs. Each set of returned nodes

local_edge_connectivity()

k_edge_subgraphs()
similar to this function, but the subgraph defined by the nodes must also have k-edge-connectivity.
k_components()
similar to this function, but uses node-connectivity instead of edge-connectivity
Raises: NetworkXNotImplemented: – If the input graph is a multigraph. ValueError: – If k is less than 1

Notes

Attempts to use the most efficient implementation available based on k. If k=1, this is simply simply connected components for directed graphs and connected components for undirected graphs. If k=2 on an efficient bridge connected component algorithm from _[1] is run based on the chain decomposition. Otherwise, the algorithm from _[2] 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()