+
    )i
                         R t ^ RIt^ RIHt . ROt]! R4      ]P                  R 4       4       t]! R4      ]P                  R 4       4       t]! R4      ]P                  R 4       4       t	R# )zAttracting components.N)not_implemented_for
undirectedc              #     "   \        \        P                  ! V 4      4      p\        P                  ! W4      pV F%  pVP	                  V4      ^ 8X  g   K  W,          x  K'  	  R# 5i)a}  Generates the 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.

To obtain induced subgraphs on each component use:
``(G.subgraph(c).copy() for c in attracting_components(G))``

Parameters
----------
G : DiGraph, MultiDiGraph
    The graph to be analyzed.

Returns
-------
attractors : generator of sets
    A generator of sets of nodes, one for each attracting component of G.

Raises
------
NetworkXNotImplemented
    If the input graph is undirected.

See Also
--------
number_attracting_components
is_attracting_component

N)listnxstrongly_connected_componentscondensation
out_degree)GscccGns   &   g/var/www/html/photoedit/myenv/lib/python3.14/site-packages/networkx/algorithms/components/attracting.pyattracting_componentsr      sM     J r//2
3C		 B==q &L s   AA%A%c                8    \        R \        V 4       4       4      # )aX  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

c              3   &   "   T F  p^x  K	  	  R# 5i)   N ).0acs   & r   	<genexpr>/number_attracting_components.<locals>.<genexpr>S   s     43Rq3s   )sumr   )r
   s   &r   number_attracting_componentsr   9   s    4 403444    c                    \        \        V 4      4      p\        V4      ^8X  d   \        V^ ,          4      \        V 4      8H  # R# )a  Returns True if `G` consists of a single attracting component.

Parameters
----------
G : DiGraph, MultiDiGraph
    The graph to be analyzed.

Returns
-------
attracting : bool
    True if `G` has a single attracting component. Otherwise, False.

Raises
------
NetworkXNotImplemented
    If the input graph is undirected.

See Also
--------
attracting_components
number_attracting_components

F)r   r   len)r
   r   s   & r   is_attracting_componentr   V   s9    4 
#A&	'B
2w!|2a5zSV##r   )r   r   r   )
__doc__networkxr   networkx.utils.decoratorsr   __all___dispatchabler   r   r   r   r   r   <module>r#      s      9 \"'  #'T \"5  #56 \"  #r   