NetworkX

Previous topic

number_attracting_components

Next topic

attracting_component_subgraphs

attracting_components

attracting_components(G)[source]

Returns a list of attracting components in G.

An attracting component in a directed graph G is 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.

Parameters :

G : DiGraph, MultiDiGraph

The graph to be analyzed.

Returns :

attractors : list

The list of attracting components, sorted from largest attracting component to smallest attracting component.