+
    �°³j=  ã                   óÚ   € 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 t
R# )	zWeakly connected components.N)Únot_implemented_forÚ
undirectedc              #  ó¼   "  € \        4       p\        V 4      pV  F<  pW19  g   K  \        W\        V4      ,
          V4      pVP                  V4       Vx € K>  	  R# 5i)aR  Generate weakly connected components of G.

Parameters
----------
G : NetworkX graph
    A directed graph

Returns
-------
comp : generator of sets
    A generator of sets of nodes, one for each weakly connected
    component of G.

Raises
------
NetworkXNotImplemented
    If G is undirected.

Examples
--------
Generate a sorted list of weakly connected components, largest first.

>>> G = nx.path_graph(4, create_using=nx.DiGraph())
>>> nx.add_path(G, [10, 11, 12])
>>> [
...     len(c)
...     for c in sorted(nx.weakly_connected_components(G), key=len, reverse=True)
... ]
[4, 3]

If you only want the largest component, it's more efficient to
use max instead of sort:

>>> largest_cc = max(nx.weakly_connected_components(G), key=len)

See Also
--------
connected_components
strongly_connected_components

Notes
-----
For directed graphs only.

N)ÚsetÚlenÚ
_plain_bfsÚupdate)ÚGÚseenÚnÚvÚcs   &    Úp/home/luca/screen-checking/.venv/lib/python3.14/site-packages/networkx/algorithms/components/weakly_connected.pyÚweakly_connected_componentsr      sK   é € ô` ‹5€DÜˆA‹€AÛˆØŽ=Ü˜1¤# d£)�m¨QÓ/ˆAØ�K‰K˜ŒNØŒGó	 ùs
   ‚A¥7Ac                ó8   € \        R \        V 4       4       4      # )a  Returns the number of weakly connected components in G.

Parameters
----------
G : NetworkX graph
    A directed graph.

Returns
-------
n : integer
    Number of weakly connected components

Raises
------
NetworkXNotImplemented
    If G is undirected.

Examples
--------
>>> G = nx.DiGraph([(0, 1), (2, 1), (3, 4)])
>>> nx.number_weakly_connected_components(G)
2

See Also
--------
weakly_connected_components
number_connected_components
number_strongly_connected_components

Notes
-----
For directed graphs only.

c              3   ó&   "  € T F  p^x € K	  	  R# 5i)é   N© )Ú.0Ú_s   & r   Ú	<genexpr>Ú5number_weakly_connected_components.<locals>.<genexpr>k   s   é € Ð9Ñ8�Q�qÓ8ùs   ‚)Úsumr   )r	   s   &r   Ú"number_weakly_connected_componentsr   F   s   € ôJ Ñ9Ô5°aÔ8Ó9Ó9Ð9ó    c                ó’   € \        V 4      pV^ 8X  d   \        P                  ! R4      h\        \        \	        V 4      4      4      V8H  # )a•  Test directed graph for weak connectivity.

A directed graph is weakly connected if and only if the graph
is connected when the direction of the edge between nodes is ignored.

Note that if a graph is strongly connected (i.e. the graph is connected
even when we account for directionality), it is by definition weakly
connected as well.

Parameters
----------
G : NetworkX Graph
    A directed graph.

Returns
-------
connected : bool
    True if the graph is weakly connected, False otherwise.

Raises
------
NetworkXNotImplemented
    If G is undirected.

Examples
--------
>>> G = nx.DiGraph([(0, 1), (2, 1)])
>>> G.add_node(3)
>>> nx.is_weakly_connected(G)  # node 3 is not connected to the graph
False
>>> G.add_edge(2, 3)
>>> nx.is_weakly_connected(G)
True

See Also
--------
is_strongly_connected
is_semiconnected
is_connected
is_biconnected
weakly_connected_components

Notes
-----
For directed graphs only.

z-Connectivity is undefined for the null graph.)r   ÚnxÚNetworkXPointlessConceptÚnextr   )r	   r   s   & r   Úis_weakly_connectedr   n   sH   € ôd 	ˆA‹€AØˆA„vÜ×)Ò)Ø?ó
ð 	
ô ŒtÔ/°Ó2Ó3Ó4¸Ñ9Ð9r   c                ó|  € V P                   pV P                  pV0pV.pV'       d–   Tp. pV F‰  pW8,           F-  p	W•9  g   K  VP                  V	4       VP                  V	4       K/  	  WH,           F-  p	W•9  g   K  VP                  V	4       VP                  V	4       K/  	  \	        V4      V8X  g   K‡  Vu # 	  K�  V# )zkA fast BFS node generator

The direction of the edge between nodes is ignored.

For directed graphs only.

)Ú_succÚ_predÚaddÚappendr   )
r	   r   ÚsourceÚGsuccÚGpredr
   Ú	nextlevelÚ	thislevelr   Úws
   &&&       r   r   r   ©   s®   € ð �G‰G€EØ�G‰G€EØˆ8€DØ�€Iç
Øˆ	Øˆ	ÛˆAØ—X�X�Ø–=Ø—H‘H˜Q”KØ×$Ñ$ QÖ'ñ ð —X�X�Ø–=Ø—H‘H˜Q”KØ×$Ñ$ QÖ'ñ ô �4‹y˜AŽ~Ø’ó ð €Kr   )r   r   r   )Ú__doc__Únetworkxr   Únetworkx.utils.decoratorsr   Ú__all__Ú_dispatchabler   r   r   r   r   r   r   Ú<module>r0      s’   ðÙ "ã Ý 9ò€ñ �\Ó"Ø×Ññ4ó ó #ð4ñn �\Ó"Ø×Ññ#:ó ó #ð#:ñL �\Ó"Ø×Ññ6:ó ó #ð6:ôrr   