Skip to main content
`Ctrl`+`K`

# number_attracting_components

number_attracting_components(G)

  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.

  See also

  `attracting_components`
  `is_attracting_component`