This documents the development version of NetworkX. Documentation for the current release can be found here.
Generates the attracting components in
An attracting component in a directed graph
Gis a strongly connected component with the property that a random walker on the graph will never leave the component, once it enters the component.
The nodes in attracting components can also be thought of as recurrent nodes. If a random walker enters the attractor containing the node, then the node will be visited infinitely often.
To obtain induced subgraphs on each component use:
(G.subgraph(c).copy() for c in attracting_components(G))
- GDiGraph, MultiDiGraph
The graph to be analyzed.
- attractorsgenerator of sets
A generator of sets of nodes, one for each attracting component of G.
If the input graph is undirected.