+
    �°³j  ã                   óè   € R t ^ RIt^ RIHt . R
Ot]P                  R 4       t]! R4      ]P                  R 4       4       t]! R4      ]! R4      ]P                  ! RRR7      RR	 l4       4       4       t	R# )z5Functions for computing and verifying regular graphs.N)Únot_implemented_forc                óT  aaa€ \        V 4      ^ 8X  d   \        P                  ! R4      h\        P                  P	                  V 4      pV P                  4       '       g`   V P                  V4      o\        ;QJ d)    V3R lV P                   4       F  '       d   K   R# 	  R# ! V3R lV P                   4       4      # V P                  V4      oV3R lV P                   4       pV P                  V4      oV3R lV P                   4       p\        V4      ;'       d    \        V4      # )aª  Determines whether a graph is regular.

A regular graph is a graph where all nodes have the same degree. A regular
digraph is a graph where all nodes have the same indegree and all nodes
have the same outdegree.

Parameters
----------
G : NetworkX graph

Returns
-------
bool
    Whether the given graph or digraph is regular.

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

zGraph has no nodes.c              3   ó2   <"  € T F  w  rSV8H  x € K  	  R # 5i©N© )Ú.0Ú_ÚdÚd1s   &  €Ú\/home/luca/screen-checking/.venv/lib/python3.14/site-packages/networkx/algorithms/regular.pyÚ	<genexpr>Úis_regular.<locals>.<genexpr>&   s   øé € Ð0¡x™t˜q�2˜–7£xùó   ƒFTc              3   ó2   <"  € T F  w  rSV8H  x € K  	  R # 5ir   r   )r   r   r	   Úd_ins   &  €r   r   r   )   s   øé € Ð8©K¡D A�d˜a–i«Kùr   c              3   ó2   <"  € T F  w  rSV8H  x € K  	  R # 5ir   r   )r   r   r	   Úd_outs   &  €r   r   r   +   s   øé € Ð;©l¡d a�u –z«lùr   )
ÚlenÚnxÚNetworkXPointlessConceptÚutilsÚarbitrary_elementÚis_directedÚdegreeÚallÚ	in_degreeÚ
out_degree)ÚGÚn1Ú
in_regularÚout_regularr
   r   r   s   &   @@@r   Ú
is_regularr!   	   sÍ   ú€ ô0 ˆ1ƒv�„{Ü×)Ò)Ð*?Ó@Ð@Ü	�‰×	#Ñ	# AÓ	&€BØ�=‰=�?Š?Ø�X‰X�b‹\ˆß‹sÔ0 q§x¢xÓ0�sŒsÐ0ŠsÐ0ˆsÔ0 q§x¢xÓ0Ó0Ð0à�{‰{˜2‹ˆÜ8¨A¯KªKÓ8ˆ
Ø—‘˜RÓ ˆÜ;¨a¯lªlÓ;ˆÜ�:‹×3Ð3¤3 {Ó#3Ð3ó    Údirectedc                ó    a€ \         ;QJ d)    V3R lV P                   4       F  '       d   K   R# 	  R# ! V3R lV P                   4       4      # )aJ  Determines whether the graph ``G`` is a k-regular graph.

A k-regular graph is a graph where each vertex has degree k.

Parameters
----------
G : NetworkX graph

Returns
-------
bool
    Whether the given graph is k-regular.

Examples
--------
>>> G = nx.Graph([(1, 2), (2, 3), (3, 4), (4, 1)])
>>> nx.is_k_regular(G, k=3)
False

c              3   ó2   <"  € T F  w  rVS8H  x € K  	  R # 5ir   r   )r   Únr	   Úks   &  €r   r   Úis_k_regular.<locals>.<genexpr>F   s   øé € Ð+¡(™$˜!ˆq�AŽv£(ùr   FT)r   r   )r   r'   s   &fr   Úis_k_regularr)   /   s6   ø€ ÷. ‹3Ô+ !§(¢(Ó+�3Œ3Ð+Š3Ð+ˆ3Ô+ !§(¢(Ó+Ó+Ð+r"   Ú
multigraphT)Úpreserve_edge_attrsÚreturns_graphc                ó  aaaaa€ \         ;QJ d)    V3R lV P                   4       F  '       g   K   RM	  RM! V3R lV P                   4       4      '       d   \        P                  ! R4      hV P	                  4       p. pV P                   EFU  w  rVSVR,          8¬  o\        V4       Uu. uF  quV3NK  	  upoS'       d.   \        V^V,          S,
          4       Uu. uF  quV3NK  	  pp. oMU\        ^V,          ^V,          S,           4       Uu. uF  quV3NK  	  pp\        V^V,          4       Uu. uF  quV3NK  	  upoVP                  \        SS4      4       \        SW5,          P                  4       4       F  w  p	w  r«VP                  ! Wš3/ VB  K  	  VP                  VVV3R lV 4       4       VP                  V4       VP                  VSVS34       EKX  	  \        P                  ! VRVR7      o\        P                  ! VS4      '       g   \        P                  ! R4      hVP                  V3R	 lVP                   4       4       V F’  w  popoVP!                  V4       \#        V4      pS FI  p	VP$                  V	,          P                  4        F!  w  r«W¬9  g   K  VP                  ! WZ3/ VB   KG  	  KK  	  VP'                  SV,           S,           4       K”  	  V# u upi u upi u upi u upi )
uÄ  Compute a `k`-factor of a graph.

A `k`-factor of a graph is a spanning `k`-regular subgraph.
A spanning `k`-regular subgraph of `G` is a subgraph that contains
each node of `G` and a subset of the edges of `G` such that each
node has degree `k`.

Parameters
----------
G : NetworkX graph
    An undirected graph.

k : int
    The degree of the `k`-factor.

matching_weight: string, optional (default="weight")
    Edge attribute name corresponding to the edge weight.
    If not present, the edge is assumed to have weight 1.
    Used for finding the max-weighted perfect matching.

Returns
-------
NetworkX graph
    A `k`-factor of `G`.

Examples
--------
>>> G = nx.Graph([(1, 2), (2, 3), (3, 4), (4, 1)])
>>> KF = nx.k_factor(G, k=1)
>>> KF.edges()
EdgeView([(1, 2), (3, 4)])

References
----------
.. [1] "An algorithm for computing simple k-factors.",
   Meijer, Henk, Yurai NÃºÃ±ez-RodrÃ­guez, and David Rappaport,
   Information processing letters, 2009.
c              3   ó2   <"  € T F  w  rVS8  x € K  	  R # 5ir   r   )r   r   r	   r'   s   &  €r   r   Úk_factor.<locals>.<genexpr>t   s   øé € Ð
&™X‘T�Qˆ1ˆqŽ5›Xùr   TFz/Graph contains a vertex with degree less than kg       @c              3   óP   <"  € T F  pS'       d   SMS F  q!V3x € K
  	  K  	  R # 5ir   r   )r   ÚuÚvÚinnerÚis_largeÚouters   &  €€€r   r   r/   �   s#   øé € ÐV© AÇ¹ÈuÒ8T°!˜Q�Ñ8T™«ùs   ƒ&�&)ÚmaxcardinalityÚweightz7Cannot find k-factor because no perfect matching existsc              3   ó^   <"  € T F"  qS9  g   K  VR R R1,          S9  g   K  Vx € K$  	  R # 5i)Néÿÿÿÿr   )r   ÚeÚms   & €r   r   r/   š   s(   øé € ÐN¡7˜a°q©jœ¸Q¹tÀ¸t½WÈAÑ=MŸš£7ùs   ƒ-�-£
-)Úanyr   r   ÚNetworkXUnfeasibleÚcopyÚrangeÚadd_edges_fromÚzipÚitemsÚadd_edgeÚremove_nodeÚappendÚmax_weight_matchingÚis_perfect_matchingÚremove_edges_fromÚedgesÚadd_nodeÚsetÚ_adjÚremove_nodes_from)r   r'   Úmatching_weightÚgÚgadgetsÚnoder   ÚiÚcoreÚouter_nÚneighborÚattrsÚcore_setr3   r4   r;   r5   s   &f&          @@@@r   Úk_factorrX   I   s�  ü€ ÷V ƒsÔ
&˜QŸXšXÓ
&‡s‡s‚sÔ
&˜QŸXšXÓ
&×&Ò&Ü×#Ò#Ð$UÓVÐVà	�‰‹€AØ€Gð Ÿ�‰ˆØ˜ �Ñ$ˆô %*¨&¤MÓ2¡M˜q˜“¡MÑ2ˆßÜ',¨V°Q¸µZÀ!µ^Ô'DÓEÑ'D !˜1“IÑ'DˆDÐEØ‰Eä',¨Q°­Z¸¸V½Àa½Ô'HÓIÑ'H !˜1“IÑ'HˆDÐIÜ(-¨f°a¸&µjÔ(AÓBÑ(A 1˜A“YÑ(AÑBˆEð 	
×Ñœ˜U EÓ*Ô+Ü*-¨e°QµW·]±]³_Ö*EÑ&ˆGÑ&�hØ�JŠJ�wÑ2¨EÔ2ñ +Fð 	
×ÑÖV©ÓVÔVà	�‰�dÔØ�‰˜˜e T¨5Ð1×2ñ+ !ô0 	×Ò˜q°¸oÔN€AÜ×!Ò! ! Q×'Ò'Ü×#Ò#ØEó
ð 	
ð
 ×ÑÔN 1§7¢7ÓNÔNó %,Ñ ˆˆe�T˜5Ø	�
‰
�4ÔÜ�t“9ˆÛˆGØ#$§6¡6¨'¥?×#8Ñ#8Ö#:‘�ØÖ+Ø—J’J˜tÑ7°Ò7Úó $;ñ ð
 	
×Ñ˜E D�L¨5Õ0Ö1ñ %,ð €HùòQ 3ùâEùò JùÚBs   Â-K3Ã K8ÄK=Ä7L)r!   r)   rX   )r7   )
Ú__doc__Únetworkxr   Únetworkx.utilsr   Ú__all__Ú_dispatchabler!   r)   rX   r   r"   r   Ú<module>r^      s“   ðÙ ;ã Ý .â
4€ð ×Ññ"4ó ð"4ñJ �ZÓ Ø×Ññ,ó ó !ð,ñ0 �ZÓ Ù�\Ó"Ø×Ò d¸$Ô?ó[ó @ó #ó !ò[r"   