Note

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

networkx.algorithms.components.number_attracting_components

number_attracting_components(G)[source]

Returns the number of attracting components in G.

Parameters
GDiGraph, MultiDiGraph

The graph to be analyzed.

Returns
nint

The number of attracting components in G.

Raises
NetworkXNotImplemented

If the input graph is undirected.