7.12.4.2. networkx.algorithms.components.number_attracting_components

networkx.algorithms.components.number_attracting_components(G)[source]

Returns the number of attracting components in G.

Parameters:

G : DiGraph, MultiDiGraph

The graph to be analyzed.

Returns:

n : int

The number of attracting components in G.

Raises:

NetworkXNotImplemented :

If the input graph is undirected.