+
    �°³jÊG  ã                   ó  € ^ RI t ^ RIt^ RIHt ^ RIt^ RItR t ! R R4      t ! R R4      t	R t
 ! R	 R
4      t ! R R4      t ! R R4      t ! R R4      tR tR tR tR tR tR tR tR tR tR tR tR tR tR# )é    N)Úcombinationsc                 ó8   € \        R  \        W4       4       4      # )c              3   óH   "  € T F  w  r\        W,
          4      x € K  	  R # 5i©N©Úabs©Ú.0ÚaÚbs   &  Úi/home/luca/screen-checking/.venv/lib/python3.14/site-packages/networkx/generators/tests/test_geometric.pyÚ	<genexpr>Úl1dist.<locals>.<genexpr>   s   é € Ð0¡i™d˜aŒs�1•5�zˆz£iùó   ‚ "©ÚsumÚzip©ÚxÚys   &&r   Úl1distr   
   s   € ÜÑ0¤c¨!¤iÓ0Ó0Ð0ó    c                   óB   a € ] tR t^t o RtR tR tR tR tR t	Rt
V tR# )	ÚTestRandomGeometricGraphz7Unit tests for :func:`~networkx.random_geometric_graph`c                óÄ   € \         P                  ! ^2R^*R7      p\        V4      ^28X  g   Q h\         P                  ! \        ^24      R^*R7      p\        V4      ^28X  g   Q hR# ©é2   ç      Ð?©ÚseedN)ÚnxÚrandom_geometric_graphÚlenÚrange©ÚselfÚGs   & r   Útest_number_of_nodesÚ-TestRandomGeometricGraph.test_number_of_nodes   sN   € Ü×%Ò% b¨$°RÔ8ˆÜ�1‹v˜Œ|Ðˆ|Ü×%Ò%¤e¨B£i°¸BÔ?ˆÜ�1‹v˜Œ|ÐŠ|r   c                ó´  € \         P                  ! ^2R4      p\        V^4       F°  w  r#W1V,          9   dQ   \        P                  ! VP
                  V,          R,          VP
                  V,          R,          4      R8:  g   Q hKb  \        P                  ! VP
                  V,          R,          VP
                  V,          R,          4      R8:  g   K°  Q h	  R# ©ú\Tests that pairs of vertices adjacent if and only if they are
within the prescribed radius.
r   ÚposN)r!   r"   r   ÚmathÚdistÚnodes©r&   r'   ÚuÚvs   &   r   Útest_distancesÚ'TestRandomGeometricGraph.test_distances   sš   € ô ×%Ò% b¨$Ó/ˆÜ   AÖ&‰DˆAà�a•DŒyÜ—y’y §¡¨¥¨EÕ!2°A·G±G¸AµJ¸uÕ4EÓFÈ$ÔNÐNÒNô  Ÿ9š9 Q§W¡W¨Q¥Z°Õ%6¸¿¹À½
À5Õ8IÓJÈdÖRÐRÐRó 'r   c                óŒ  € \         P                  ! ^2R^R7      p\        V^4       Fš  w  r#W1V,          9   dF   \        VP                  V,          R,          VP                  V,          R,          4      R8:  g   Q hKW  \        VP                  V,          R,          VP                  V,          R,          4      R8:  g   Kš  Q h	  R# )úBTests for providing an alternate distance metric to the generator.r   ©Úpr-   N)r!   r"   r   r   r0   r1   s   &   r   Útest_pÚTestRandomGeometricGraph.test_p&   s”   € ô ×%Ò% b¨$°!Ô4ˆÜ   AÖ&‰DˆAà�a•DŒyÜ˜aŸg™g a�j¨Õ/°·±¸µ¸EÕ1BÓCÀtÔKÐKÒKô " !§'¡'¨!¥*¨UÕ"3°Q·W±W¸QµZÀÕ5FÓGÈ4ÖOÐOÐOó 'r   c                ó  € ^ RI p\        VP                  4      p\        P                  ! VR4      p\        V4      \        V4      8X  g   Q h\        V^4       F°  w  rEWSV,          9   dQ   \        P                  ! VP                  V,          R,          VP                  V,          R,          4      R8:  g   Q hKb  \        P                  ! VP                  V,          R,          VP                  V,          R,          4      R8:  g   K°  Q h	  R# ©ú=Tests using values other than sequential numbers as node IDs.Nr   r-   )
ÚstringÚlistÚascii_lowercaser!   r"   r#   r   r.   r/   r0   ©r&   r?   r0   r'   r2   r3   s   &     r   Útest_node_namesÚ(TestRandomGeometricGraph.test_node_names2   sÁ   € ãä�V×+Ñ+Ó,ˆÜ×%Ò% e¨TÓ2ˆÜ�1‹vœ˜U›Ô#Ð#Ð#ä   AÖ&‰DˆAà�a•DŒyÜ—y’y §¡¨¥¨EÕ!2°A·G±G¸AµJ¸uÕ4EÓFÈ$ÔNÐNÒNô  Ÿ9š9 Q§W¡W¨Q¥Z°Õ%6¸¿¹À½
À5Õ8IÓJÈdÖRÐRÐRó 'r   c                ó  € \         P                  ! ^2R^*RR7      p\        ;QJ d4    R VP                  P	                  4        4       F  '       d   K   RM)	  RM%! R VP                  P	                  4        4       4      '       g   Q hR# )r   r   Úcoords©r    Úpos_namec              3   óP   "  € T F  w  r\        VR ,          4      ^8H  x € K  	  R# 5i©rF   N©r#   ©r
   ÚnÚds   &  r   r   Ú9TestRandomGeometricGraph.test_pos_name.<locals>.<genexpr>D   ó    é € ÐE±_©T¨Q”3�q˜•{Ó# qÖ(³_ùó   ‚$&FTN)r!   r"   Úallr0   Úitemsr%   s   & r   Útest_pos_nameÚ&TestRandomGeometricGraph.test_pos_nameB   sS   € Ü×%Ò% b¨$°RÀ(ÔKˆß‹sÑE°Q·W±W·]±]´_ÓE�s�sŠsÑE°Q·W±W·]±]´_ÓE×EÒEÐEÒEr   © N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r(   r4   r:   rC   rT   Ú__static_attributes__Ú__classdictcell__©Ú__classdict__s   @r   r   r      s+   ø‡ € ÙAòòSò
PòS÷ Fð Fr   r   c                   óN   a € ] tR t^Gt o RtR tR tR tR tR t	R t
R tR	tV tR
# )ÚTestSoftRandomGeometricGraphz<Unit tests for :func:`~networkx.soft_random_geometric_graph`c                óÄ   € \         P                  ! ^2R^*R7      p\        V4      ^28X  g   Q h\         P                  ! \        ^24      R^*R7      p\        V4      ^28X  g   Q hR# r   )r!   Úsoft_random_geometric_graphr#   r$   r%   s   & r   r(   Ú1TestSoftRandomGeometricGraph.test_number_of_nodesJ   sN   € Ü×*Ò*¨2¨t¸"Ô=ˆÜ�1‹v˜Œ|Ðˆ|Ü×*Ò*¬5°«9°dÀÔDˆÜ�1‹v˜Œ|ÐŠ|r   c                ó  € \         P                  ! ^2R4      p\        V^4       Fb  w  r#W1V,          9   g   K  \        P                  ! VP
                  V,          R,          VP
                  V,          R,          4      R8:  d   Kb  Q h	  R# r+   )r!   rc   r   r.   r/   r0   r1   s   &   r   r4   Ú+TestSoftRandomGeometricGraph.test_distancesP   se   € ô ×*Ò*¨2¨tÓ4ˆÜ   AÖ&‰DˆAà�a•DŽyÜ—y’y §¡¨¥¨EÕ!2°A·G±G¸AµJ¸uÕ4EÓFÈ$ÖNÐNÐNó 'r   c                ó  € R p\         P                  ! ^2R^R7      p\        V^4       FT  w  r4WBV,          9   g   K  V! VP                  V,          R,          VP                  V,          R,          4      R8:  d   KT  Q h	  R# )r7   c                 ó8   € \        R  \        W4       4       4      # )c              3   óH   "  € T F  w  r\        W,
          4      x € K  	  R # 5ir   r   r	   s   &  r   r   ÚDTestSoftRandomGeometricGraph.test_p.<locals>.dist.<locals>.<genexpr>a   ó   é € Ð8©i¡d a”s˜1�5—z�z«iùr   r   r   s   &&r   r/   Ú1TestSoftRandomGeometricGraph.test_p.<locals>.dist`   ó   € ÜÑ8¬c°!¬iÓ8Ó8Ð8r   r   r8   r-   N)r!   rc   r   r0   ©r&   r/   r'   r2   r3   s   &    r   r:   Ú#TestSoftRandomGeometricGraph.test_p\   sh   € ò	9ô ×*Ò*¨2¨t°qÔ9ˆÜ   AÖ&‰DˆAà�a•DŽyÙ˜AŸG™G A�J uÕ-¨q¯w©w°q­z¸%Õ/@ÓAÀTÖIÐIÐIó 'r   c                ó€  € ^ RI p\        VP                  4      p\        P                  ! VR4      p\        V4      \        V4      8X  g   Q h\        V^4       Fb  w  rEWSV,          9   g   K  \        P                  ! VP                  V,          R,          VP                  V,          R,          4      R8:  d   Kb  Q h	  R# r=   )
r?   r@   rA   r!   rc   r#   r   r.   r/   r0   rB   s   &     r   rC   Ú,TestSoftRandomGeometricGraph.test_node_namesi   sŒ   € ãä�V×+Ñ+Ó,ˆÜ×*Ò*¨5°$Ó7ˆÜ�1‹vœ˜U›Ô#Ð#Ð#ä   AÖ&‰DˆAà�a•DŽyÜ—y’y §¡¨¥¨EÕ!2°A·G±G¸AµJ¸uÕ4EÓFÈ$ÖNÐNÐNó 'r   c           
     ó†  € ^2p^p\        V4       UUu/ uF1  q3\        V4       Uu. uF  p\        P                  ! 4       NK  	  upbK3  	  ppp\        P                  ! ^2RVR7      p\        P                  ! ^2RVR7      p\        VP                  4       4      \        VP                  4       4      8:  g   Q hR# u upi u uppi )zgTests default p_dict = 0.5 returns graph with edge count <= RGG with
same n, radius, dim and positions
r   )r-   N)r$   Úrandomr!   r"   rc   r#   Úedges)r&   r0   Údimr3   Úir-   ÚRGGÚSRGGs   &       r   Útest_p_dist_defaultÚ0TestSoftRandomGeometricGraph.test_p_dist_defaultv   s–   € ð ˆØˆÜAFÀuÄÔNÁ¸A¬E°#¬JÓ7©J q”6—=’=–?©JÑ7Ò7ÁˆÑNÜ×'Ò'¨¨D°cÔ:ˆÜ×-Ò-¨b°$¸CÔ@ˆÜ�4—:‘:“<Ó ¤C¨¯	©	«Ó$4Ô4Ð4Ò4ùò 8ùÓNs   “B=¥B8ÁB=Â8B=c                óv   € R p\         P                  ! ^2RVR7      p\        VP                  4      ^ 8X  g   Q hR# )ú;Tests if p_dict = 0 returns disconnected graph with 0 edgesc                 ó   € ^ # ©r   rV   ©r/   s   &r   Úp_distÚ=TestSoftRandomGeometricGraph.test_p_dist_zero.<locals>.p_dist„   ó   € Ùr   r   ©r€   N)r!   rc   r#   rt   ©r&   r€   r'   s   &  r   Útest_p_dist_zeroÚ-TestSoftRandomGeometricGraph.test_p_dist_zero�   s3   € ò	ô ×*Ò*¨2¨t¸FÔCˆÜ�1—7‘7‹|˜qÔ Ð Ò r   c                ó  € \         P                  ! ^2R^*RR7      p\        ;QJ d4    R VP                  P	                  4        4       F  '       d   K   RM)	  RM%! R VP                  P	                  4        4       4      '       g   Q hR# )r   r   rF   rG   c              3   óP   "  € T F  w  r\        VR ,          4      ^8H  x € K  	  R# 5irJ   rK   rL   s   &  r   r   Ú=TestSoftRandomGeometricGraph.test_pos_name.<locals>.<genexpr>Œ   rP   rQ   FTN)r!   rc   rR   r0   rS   r%   s   & r   rT   Ú*TestSoftRandomGeometricGraph.test_pos_nameŠ   sS   € Ü×*Ò*¨2¨t¸"ÀxÔPˆß‹sÑE°Q·W±W·]±]´_ÓE�s�sŠsÑE°Q·W±W·]±]´_ÓE×EÒEÐEÒEr   rV   N)rW   rX   rY   rZ   r[   r(   r4   r:   rC   ry   r…   rT   r\   r]   r^   s   @r   ra   ra   G   s5   ø‡ € ÙFòò
OòJòOò	5ò!÷Fð Fr   ra   c                óÎ   € V P                   V,          V P                   V,          rvVR,          VR,          r˜VR,          VR,          rºW«,           V! W‰4      V,          ,          V8¬  # )ab  Returns ``True`` if and only if the nodes whose attributes are
``du`` and ``dv`` should be joined, according to the threshold
condition for geographical threshold graphs.

``G`` is an undirected NetworkX graph, and ``u`` and ``v`` are nodes
in that graph. The nodes must have node attributes ``'pos'`` and
``'weight'``.

``metric`` is a distance metric.
r-   Úweight)r0   )r'   r2   r3   ÚthetaÚalphaÚmetricÚduÚdvÚu_posÚv_posÚu_weightÚv_weights   &&&&&&      r   Újoinr–   �   sV   € ð �W‰W�Q�Z˜Ÿ™ �ˆØ�e•9˜b �iˆ5Ø˜H� r¨(¥|ˆhØÕ¡6¨%Ó#7¸5Õ#@Õ@ÀEÑIÐIr   c                   óB   a € ] tR t^ t o RtR tR tR tR tR t	Rt
V tR# )	ÚTestGeographicalThresholdGraphz=Unit tests for :func:`~networkx.geographical_threshold_graph`c                óÄ   € \         P                  ! ^2^d^*R7      p\        V4      ^28X  g   Q h\         P                  ! \        ^24      ^d^*R7      p\        V4      ^28X  g   Q hR# )r   r   N)r!   Úgeographical_threshold_graphr#   r$   r%   s   & r   r(   Ú3TestGeographicalThresholdGraph.test_number_of_nodes£   sN   € Ü×+Ò+¨B°¸"Ô=ˆÜ�1‹v˜Œ|Ðˆ|Ü×+Ò+¬E°"«I°sÀÔDˆÜ�1‹v˜Œ|ÐŠ|r   c           	     ó  € \         P                  ! ^2^
4      p\        V^4       F^  w  r#W1V,          9   d(   \        WV^
R\        P
                  4      '       g   Q hK9  \        WV^
R\        P
                  4      '       g   K^  Q h	  R# )z_Tests that pairs of vertices adjacent if and only if their
distances meet the given threshold.
Néþÿÿÿ)r!   rš   r   r–   r.   r/   r1   s   &   r   r4   Ú-TestGeographicalThresholdGraph.test_distances©   sn   € ô ×+Ò+¨B°Ó3ˆÜ   AÖ&‰DˆAà�a•DŒyÜ˜A ! R¨¬T¯Y©Y×7Ò7Ð7Ò7ô    a¨¨R´·±×;Ô;Ð;Ð;ó 'r   c           	     óô   € \         P                  ! ^2^
\        R7      p\        V^4       FJ  w  r#W1V,          9   d   \	        WV^
R\        4      '       g   Q hK/  \	        WV^
R\        4      '       g   KJ  Q h	  R# )r7   ©r�   Nr�   )r!   rš   r   r   r–   r1   s   &   r   Útest_metricÚ*TestGeographicalThresholdGraph.test_metric¸   sh   € ô ×+Ò+¨B°¼6ÔBˆÜ   AÖ&‰DˆAà�a•DŒyÜ˜A ! R¨¬V×4Ò4Ð4Ò4ô    a¨¨R´×8Ô8Ð8Ð8ó 'r   c                óv   € R p\         P                  ! ^2^VR7      p\        VP                  4      ^ 8X  g   Q hR# )r|   c                 ó   € ^ # r~   rV   r   s   &r   r€   Ú?TestGeographicalThresholdGraph.test_p_dist_zero.<locals>.p_distÇ   r‚   r   rƒ   N)r!   rš   r#   rt   r„   s   &  r   r…   Ú/TestGeographicalThresholdGraph.test_p_dist_zeroÄ   s3   € ò	ô ×+Ò+¨B°¸&ÔAˆÜ�1—7‘7‹|˜qÔ Ð Ò r   c                óð  € \         P                  pV! ^2^d^*RRR7      p\        ;QJ d4    R VP                  P	                  4        4       F  '       d   K   RM)	  RM%! R VP                  P	                  4        4       4      '       g   Q h\        ;QJ d4    R VP                  P	                  4        4       F  '       d   K   RM)	  RM%! R VP                  P	                  4        4       4      '       g   Q hR# )	r   rF   Úwt©r    rH   Úweight_namec              3   óP   "  € T F  w  r\        VR ,          4      ^8H  x € K  	  R# 5irJ   rK   rL   s   &  r   r   ÚFTestGeographicalThresholdGraph.test_pos_weight_name.<locals>.<genexpr>Ð   rP   rQ   FTc              3   ó>   "  € T F  w  rVR ,          ^ 8„  x € K  	  R# 5i©r¨   NrV   rL   s   &  r   r   r¬   Ñ   ó   é € Ð;©?¡4 1�1�T•7˜Q–;«?ùó   ‚N)r!   rš   rR   r0   rS   )r&   Úgtgr'   s   &  r   Útest_pos_weight_nameÚ3TestGeographicalThresholdGraph.test_pos_weight_nameÍ   s•   € Ü×-Ñ-ˆÙ��C˜b¨8ÀÔFˆß‹sÑE°Q·W±W·]±]´_ÓE�s�sŠsÑE°Q·W±W·]±]´_ÓE×EÒEÐEÐEß‹sÑ;¨1¯7©7¯=©=¬?Ó;�s�sŠsÑ;¨1¯7©7¯=©=¬?Ó;×;Ò;Ð;Ò;r   rV   N)rW   rX   rY   rZ   r[   r(   r4   r¡   r…   r²   r\   r]   r^   s   @r   r˜   r˜       s&   ø‡ € ÙGòò<ò
9ò!÷<ð <r   r˜   c                   ó<   a € ] tR t^Ôt o RtR tR tR tR tRt	V t
R# )ÚTestWaxmanGraphz;Unit tests for the :func:`~networkx.waxman_graph` function.c                óÈ   € \         P                  ! ^2RR^*R7      p\        V4      ^28X  g   Q h\         P                  ! \        ^24      RR^*R7      p\        V4      ^28X  g   Q hR# )r   ç      à?çš™™™™™¹?r   N©r!   Úwaxman_graphr#   r$   r%   s   & r   Útest_number_of_nodes_1Ú&TestWaxmanGraph.test_number_of_nodes_1×   sN   € Ü�OŠO˜B  S¨rÔ2ˆÜ�1‹v˜Œ|Ðˆ|Ü�OŠOœE "›I s¨C°bÔ9ˆÜ�1‹v˜Œ|ÐŠ|r   c                óÈ   € \         P                  ! ^2RR^R7      p\        V4      ^28X  g   Q h\         P                  ! \        ^24      RR^R7      p\        V4      ^28X  g   Q hR# )r   r·   r¸   )ÚLNr¹   r%   s   & r   Útest_number_of_nodes_2Ú&TestWaxmanGraph.test_number_of_nodes_2Ý   sN   € Ü�OŠO˜B  S¨AÔ.ˆÜ�1‹v˜Œ|Ðˆ|Ü�OŠOœE "›I s¨C°1Ô5ˆÜ�1‹v˜Œ|ÐŠ|r   c                óf   € \         P                  ! ^2RR\        R7      p\        V4      ^28X  g   Q hR# )r7   r·   r¸   r    N)r!   rº   r   r#   r%   s   & r   r¡   ÚTestWaxmanGraph.test_metricã   s(   € ô �OŠO˜B  S´Ô8ˆÜ�1‹v˜Œ|ÐŠ|r   c                ó  € \         P                  ! ^2RR^*RR7      p\        ;QJ d4    R VP                  P	                  4        4       F  '       d   K   RM)	  RM%! R VP                  P	                  4        4       4      '       g   Q hR# )	r   r·   r¸   rF   rG   c              3   óP   "  € T F  w  r\        VR ,          4      ^8H  x € K  	  R# 5irJ   rK   rL   s   &  r   r   Ú0TestWaxmanGraph.test_pos_name.<locals>.<genexpr>ë   rP   rQ   FTN)r!   rº   rR   r0   rS   r%   s   & r   rT   ÚTestWaxmanGraph.test_pos_nameé   sS   € Ü�OŠO˜B  S¨r¸HÔEˆß‹sÑE°Q·W±W·]±]´_ÓE�s�sŠsÑE°Q·W±W·]±]´_ÓE×EÒEÐEÒEr   rV   N)rW   rX   rY   rZ   r[   r»   r¿   r¡   rT   r\   r]   r^   s   @r   rµ   rµ   Ô   s#   ø‡ € ÙEòòò÷Fð Fr   rµ   c                   ó’   a € ] tR t^ît o R tR tR tR tR t]	P                  P                  R]! RR^
4      4      R	 4       tR
tV tR# )ÚTestNavigableSmallWorldGraphc                ó6  € \         P                  ! ^^^ ^*R7      p\         P                  ! ^^4      P                  4       p\         P                  ! W4      '       g   Q h\         P                  ! ^^^ ^R7      p\         P
                  ! . RO4      P                  4       p\         P                  ! W4      '       g   Q h\         P                  ! ^^^ ^R7      p\         P
                  ! ^.4      P                  4       p\         P                  ! W4      '       g   Q hR# )é   )r9   Úqr    ©r9   rË   ru   N)rÊ   rÊ   rÊ   )r!   Únavigable_small_world_graphÚgrid_2d_graphÚto_directedÚis_isomorphicÚ
grid_graph)r&   r'   Úggs   &  r   Útest_navigable_small_worldÚ7TestNavigableSmallWorldGraph.test_navigable_small_worldï   sÔ   € Ü×*Ò*¨1°°Q¸RÔ@ˆÜ×Ò˜a Ó#×/Ñ/Ó1ˆÜ×Ò ×&Ò&Ð&Ð&ä×*Ò*¨1°°Q¸AÔ>ˆÜ�]Š]š9Ó%×1Ñ1Ó3ˆÜ×Ò ×&Ò&Ð&Ð&ä×*Ò*¨1°°Q¸AÔ>ˆÜ�]Š]˜A˜3Ó×+Ñ+Ó-ˆÜ×Ò ×&Ò&Ð&Ò&r   c           	     óÐ   € \         P                  ! \        P                  R R7      ;_uu_ 4        \        P                  ! ^^ ^ ^R7       RRR4       R#   + '       g   i     R# ; i)z.*p must be >= 1©ÚmatchrÌ   N©ÚpytestÚraisesr!   ÚNetworkXExceptionrÍ   ©r&   s   &r   Útest_invalid_diameter_valueÚ8TestNavigableSmallWorldGraph.test_invalid_diameter_valueü   s>   € Ü�]Š]œ2×/Ñ/Ð7I×JÖJÜ×*Ò*¨1°°Q¸AÕ>÷ K×J×JÒJúó   ¯AÁA%	c           	     óÐ   € \         P                  ! \        P                  R R7      ;_uu_ 4        \        P                  ! ^^R^R7       RRR4       R#   + '       g   i     R# ; i)z.*q must be >= 0rÖ   rÌ   NéÿÿÿÿrØ   rÜ   s   &r   Ú)test_invalid_long_range_connections_valueÚFTestNavigableSmallWorldGraph.test_invalid_long_range_connections_value   s>   € Ü�]Š]œ2×/Ñ/Ð7I×JÖJÜ×*Ò*¨1°°R¸QÕ?÷ K×J×JÒJúrß   c           
     óÒ   € \         P                  ! \        P                  R R7      ;_uu_ 4        \        P                  ! ^^^ R^R7       RRR4       R#   + '       g   i     R# ; i)z.*r must be >= 0rÖ   )r9   rË   Úrru   Nrá   rØ   rÜ   s   &r   Ú4test_invalid_exponent_for_decaying_probability_valueÚQTestNavigableSmallWorldGraph.test_invalid_exponent_for_decaying_probability_value  s@   € Ü�]Š]œ2×/Ñ/Ð7I×JÖJÜ×*Ò*¨1°°Q¸"À!ÕD÷ K×J×JÒJúó   ¯AÁA&	c           	     óÚ   € \         P                  ! ^^^ R^^*R7      p\         P                  ! ^^\         P                  R7      p\         P                  P                  W4      '       g   Q hR# )z%Smoke test for radius in range [0, 1]r·   )r9   rË   rå   ru   r    )Úcreate_usingN)r!   rÍ   rÎ   ÚDiGraphÚutilsÚgraphs_equal)r&   r'   Úexpecteds   &  r   Útest_r_between_0_and_1Ú3TestNavigableSmallWorldGraph.test_r_between_0_and_1  sQ   € ô ×*Ò*¨1°°Q¸#À1È2ÔNˆÜ×#Ò# A q´r·z±zÔBˆÜ�x‰x×$Ñ$ Q×1Ò1Ð1Ò1r   r    i®	  i
  c                ó6  € \         P                  ! ^^RVR7      p\         P                  ! ^^^VR7      p\         P                  ! ^^^VR7      pVP                  4       VP                  4       8”  g   Q hVP                  4       VP                  4       8”  g   Q hR# )a'  The probability of adding a long-range edge scales with `1 / dist**r`,
so a navigable_small_world graph created with r < 1 should generally
result in more edges than a navigable_small_world graph with r >= 1
(for 0 < q << n).

N.B. this is probabilistic, so this test may not hold for all seeds.r·   )rË   rå   r    N)r!   rÍ   Únumber_of_edges)r&   r    ÚG1ÚG2ÚG3s   &&   r   Útest_r_general_scalingÚ3TestNavigableSmallWorldGraph.test_r_general_scaling  s†   € ô ×+Ò+¨A°°cÀÔEˆÜ×+Ò+¨A°°a¸dÔCˆÜ×+Ò+¨A°°a¸dÔCˆØ×!Ñ!Ó# b×&8Ñ&8Ó&:Ô:Ð:Ð:Ø×!Ñ!Ó# b×&8Ñ&8Ó&:Ô:Ð:Ò:r   rV   N)rW   rX   rY   rZ   rÓ   rÝ   râ   ræ   rï   rÙ   ÚmarkÚparametrizer$   rö   r\   r]   r^   s   @r   rÈ   rÈ   î   sN   ø‡ € ò'ò?ò@òEò2ð ‡[�[×Ñ˜V¡U¨4°°rÓ%:Ó;ñ;ó <ö;r   rÈ   c                   óH   a € ] tR tRt o RtR tR tR tR tR t	R t
R	tV tR
# )Ú#TestThresholdedRandomGeometricGraphi  zCUnit tests for :func:`~networkx.thresholded_random_geometric_graph`c                óÈ   € \         P                  ! ^2RR^*R7      p\        V4      ^28X  g   Q h\         P                  ! \        ^24      RR^*R7      p\        V4      ^28X  g   Q hR# )r   gš™™™™™É?r¸   r   N)r!   Ú"thresholded_random_geometric_graphr#   r$   r%   s   & r   r(   Ú8TestThresholdedRandomGeometricGraph.test_number_of_nodes!  sR   € Ü×1Ò1°"°c¸3ÀRÔHˆÜ�1‹v˜Œ|Ðˆ|Ü×1Ò1´%¸³)¸SÀ#ÈBÔOˆÜ�1‹v˜Œ|ÐŠ|r   c                ó  € \         P                  ! ^2RR^*R7      p\        V^4       Fb  w  r#W1V,          9   g   K  \        P                  ! VP
                  V,          R,          VP
                  V,          R,          4      R8:  d   Kb  Q h	  R# )r,   r   r¸   r   r-   N)r!   rý   r   r.   r/   r0   r1   s   &   r   r4   Ú2TestThresholdedRandomGeometricGraph.test_distances'  si   € ô ×1Ò1°"°d¸CÀbÔIˆÜ   AÖ&‰DˆAà�a•DŽyÜ—y’y §¡¨¥¨EÕ!2°A·G±G¸AµJ¸uÕ4EÓFÈ$ÖNÐNÐNó 'r   c                ó
  € R p\         P                  ! ^2RR^^*R7      p\        V^4       FT  w  r4WBV,          9   g   K  V! VP                  V,          R,          VP                  V,          R,          4      R8:  d   KT  Q h	  R# )r7   c                 ó8   € \        R  \        W4       4       4      # )c              3   óH   "  € T F  w  r\        W,
          4      x € K  	  R # 5ir   r   r	   s   &  r   r   ÚKTestThresholdedRandomGeometricGraph.test_p.<locals>.dist.<locals>.<genexpr>8  rk   r   r   r   s   &&r   r/   Ú8TestThresholdedRandomGeometricGraph.test_p.<locals>.dist7  rm   r   r   r¸   )r9   r    r-   N©r!   rý   r   r0   rn   s   &    r   r:   Ú*TestThresholdedRandomGeometricGraph.test_p3  sl   € ò	9ô ×1Ò1°"°d¸CÀ1È2ÔNˆÜ   AÖ&‰DˆAà�a•DŽyÙ˜AŸG™G A�J uÕ-¨q¯w©w°q­z¸%Õ/@ÓAÀTÖIÐIÐIó 'r   c                ó†  € ^ RI p\        VP                  4      p\        P                  ! VRR^*R7      p\        V4      \        V4      8X  g   Q h\        V^4       Fb  w  rEWSV,          9   g   K  \        P                  ! VP                  V,          R,          VP                  V,          R,          4      R8:  d   Kb  Q h	  R# )r>   Nr   r¸   r   r-   )
r?   r@   rA   r!   rý   r#   r   r.   r/   r0   rB   s   &     r   rC   Ú3TestThresholdedRandomGeometricGraph.test_node_names@  s�   € ãä�V×+Ñ+Ó,ˆÜ×1Ò1°%¸¸sÈÔLˆÜ�1‹vœ˜U›Ô#Ð#Ð#ä   AÖ&‰DˆAà�a•DŽyÜ—y’y §¡¨¥¨EÕ!2°A·G±G¸AµJ¸uÕ4EÓFÈ$ÖNÐNÐNó 'r   c                ó  € \         P                  ! ^2RR^*R7      p\        V^4       FT  w  r#W1V,          9   g   K  VP                  V,          R,          VP                  V,          R,          ,           R8¼  d   KT  Q h	  R# )znTests that pairs of vertices adjacent if and only if their sum
weights exceeds the threshold parameter theta.
r   r¸   r   rŒ   Nr  r1   s   &   r   Ú
test_thetaÚ.TestThresholdedRandomGeometricGraph.test_thetaM  sc   € ô ×1Ò1°"°d¸CÀbÔIˆä   AÖ&‰DˆAà�a•DŽyØŸ™ �
 8Õ,¨q¯w©w°q­z¸(Õ/CÕCÈÖKÐKÐKó 'r   c           	     óò  € \         P                  pV! ^2RR^*RRR7      p\        ;QJ d4    R VP                  P	                  4        4       F  '       d   K   RM)	  RM%! R VP                  P	                  4        4       4      '       g   Q h\        ;QJ d4    R	 VP                  P	                  4        4       F  '       d   K   RM)	  RM%! R	 VP                  P	                  4        4       4      '       g   Q hR
# )r   r   r¸   r9   r¨   r©   c              3   óP   "  € T F  w  r\        VR ,          4      ^8H  x € K  	  R# 5i)r9   NrK   rL   s   &  r   r   ÚDTestThresholdedRandomGeometricGraph.test_pos_name.<locals>.<genexpr>[  s   é € Ð@±©¨”3�q˜•v“; !Ö#³ùrQ   FTc              3   ó>   "  € T F  w  rVR ,          ^ 8„  x € K  	  R# 5ir®   rV   rL   s   &  r   r   r  \  r¯   r°   N)r!   rý   rR   r0   rS   )r&   Útrggr'   s   &  r   rT   Ú1TestThresholdedRandomGeometricGraph.test_pos_nameX  s—   € Ü×4Ñ4ˆÙ��T˜3 R°#À4ÔHˆß‹sÑ@°·±·±´Ó@�s�sŠsÑ@°·±·±´Ó@×@Ò@Ð@Ð@ß‹sÑ;¨1¯7©7¯=©=¬?Ó;�s�sŠsÑ;¨1¯7©7¯=©=¬?Ó;×;Ò;Ð;Ò;r   rV   N)rW   rX   rY   rZ   r[   r(   r4   r:   rC   r  rT   r\   r]   r^   s   @r   rû   rû     s/   ø‡ € ÙMòò
OòJòOò	L÷<ð <r   rû   c                  ó¸   € \         P                  ! 4       p V P                  ^ RR/3^RR/3^RR/3.4       RR.pV\         P                  ! V ^RR7      8X  g   Q hR# )r   Úposition)ÚradiusrH   N)r   r   )r   é   )r  r   )r   é   )r!   ÚGraphÚadd_nodes_fromÚgeometric_edges)r'   Úexpected_edgess     r   Ú"test_geometric_edges_pos_attributer  _  sp   € Ü
�Š‹
€AØ×Ñà�˜VÐ$Ð%Ø�˜VÐ$Ð%Ø�˜VÐ$Ð%ð	
ôð ˜fÐ%€NØœR×/Ò/°¸!ÀjÔQÔQÐQÒQr   c                  óü   € \         P                  ! ^4      p Rp\        P                  ! \         P                  VR7      ;_uu_ 4        \         P
                  ! V ^R7       RRR4       R#   + '       g   i     R# ; i)é   zall nodes. must have a 'rÖ   )r  N)r!   Ú
path_graphrÙ   rÚ   ÚNetworkXErrorr  )r'   Úmsgs     r   Ú"test_geometric_edges_raises_no_posr"  l  sK   € Ü
�Š�aÓ€AØ
$€CÜ	�Š”r×'Ñ'¨s×	3Ö	3Ü
×Ò˜1 QÕ'÷ 
4×	3×	3Ò	3ús   ÁA*Á*A;	c                  ó`   € \         P                  ! R ^dR^
^*R7      p \        V 4      ^d8X  g   Q hR# )ç      ø?çš™™™™™@©ÚbetarM   ÚgammaÚmean_degreer    N)r!   Ú"geometric_soft_configuration_graphr#   ©r'   s    r   Útest_number_of_nodes_S1r,  s  s/   € Ü
×-Ò-Ø�C˜s°¸ô	€Aô ˆq‹6�SŒ=ÐŠ=r   c                  ó2  € \         P                  ! R ^dR^
^*R7      p \         P                  ! V R4      p\        V4      ^d8X  g   Q h\         P                  ! V R4      p\        V4      ^d8X  g   Q h\         P                  ! V R4      p\        V4      ^d8X  g   Q hR# )r$  r%  r&  Úkappar�   r  N)r!   r*  Úget_node_attributesr#   )r'   ÚkappasÚthetasÚradiis       r   Útest_set_attributes_S1r3  z  s‹   € Ü
×-Ò-Ø�C˜s°¸ô	€Aô ×#Ò# A wÓ/€FÜˆv‹;˜#ÔÐÐÜ×#Ò# A wÓ/€FÜˆv‹;˜#ÔÐÐÜ×"Ò" 1 hÓ/€EÜˆu‹:˜ÔÐÒr   c                  óÐ  € \         P                  ! R ^2R^
RR7      p \         P                  ! V R4      p\        VP	                  4       4      \        V4      ,          p\        P                  ! V^
,
          4      R8  g   Q h\        V P                  4       4      p\        VP	                  4       4      \        V4      ,          p\        P                  ! V^
,
          4      ^8  g   Q hR# )ç      @r%  iW  r&  r.  r·   N)
r!   r*  r/  r   Úvaluesr#   r.   ÚfabsÚdictÚdegree)r'   r0  Úmean_kappasÚdegreesr)  s        r   Útest_mean_kappas_mean_degree_S1r<  †  s¬   € Ü
×-Ò-Ø�B˜c¨r¸ô	€Aô ×#Ò# A wÓ/€FÜ�f—m‘m“oÓ&¬¨V«Õ4€KÜ�9Š9�[ 2Õ%Ó&¨Ô,Ð,Ð,ä�1—8‘8“:Ó€GÜ�g—n‘nÓ&Ó'¬#¨g«,Õ6€KÜ�9Š9�[ 2Õ%Ó&¨Ô*Ð*Ò*r   c                  óv  € \        R 4       U u/ uF  q ^
bK  	  pp \        P                  ! ^VR7      p\        V4      R 8X  g   Q h\        P                  ! VR4      p\
        ;QJ d*    R VP                  4        4       F  '       d   K   RM	  RM! R VP                  4        4       4      '       g   Q hR# u up i )éè  ©r'  r0  r.  c              3   ó*   "  € T F	  q^
8H  x € K  	  R# 5i)é
   NrV   )r
   r.  s   & r   r   Ú&test_dict_kappas_S1.<locals>.<genexpr>™  s   é € Ð8©˜u˜Ž{«ùs   ‚FTN)r$   r!   r*  r#   r/  rR   r6  )rv   r0  r'   s      r   Útest_dict_kappas_S1rC  ”  sˆ   € Ü" 4œ[Ó)™[˜�Še™[€FÐ)Ü
×-Ò-°1¸VÔD€AÜˆq‹6�TŒ>Ðˆ>Ü×#Ò# A wÓ/€Fß‹3Ñ8¨¯©¬Ó8�3�3Š3Ñ8¨¯©¬Ó8×8Ò8Ð8Ò8ùò	 *s   ŽB6c                  óÔ   € \         P                  ! R ^dR^
^*R7      p \         P                  ! R^dR^
^*R7      p\         P                  ! V 4      \         P                  ! V4      8  g   Q hR# )r$  ç      @r&  g      @N©r!   r*  Úaverage_clustering)ró   rô   s     r   Útest_beta_clustering_S1rH  œ  s`   € Ü	×	.Ò	.Ø�C˜s°¸ô
€Bô 
×	.Ò	.Ø�C˜s°¸ô
€Bô × Ò  Ó$¤r×'<Ò'<¸RÓ'@Ô@Ð@Ò@r   c            	      óš  € \         P                  ! \        P                  R R7      ;_uu_ 4        \        P                  ! RR^
^*R7      p RRR4       \         P                  ! \        P                  RR7      ;_uu_ 4        \        R4       Uu/ uF  q^
bK  	  pp\        P                  ! RVR^*R	7      p RRR4       \         P                  ! \        P                  R R7      ;_uu_ 4        \        P                  ! R^*R
7      p RRR4       R#   + '       g   i     LÌ; iu upi   + '       g   i     Ly; i  + '       g   i     R# ; i)zDPlease provide either kappas, or all 3 of: n, gamma and mean_degree.rÖ   r$  rE  )r'  r(  r)  r    Nz;When kappas is input, n, gamma and mean_degree must not be.r>  çffffff@)r'  r0  r(  r    )r'  r    )rÙ   rÚ   r!   r   r*  r$   )r'   rv   r0  s      r   Útest_wrong_parameters_S1rK  ¦  sÿ   € Ü	�ŠÜ
×ÑØT÷
ö 
ô ×1Ò1Ø˜C¨R°bô
ˆ÷	
ô 
�ŠÜ
×ÑØK÷
ö 
ô "' t¤Ó-¡˜A�R’%¡ˆÐ-Ü×1Ò1Ø˜V¨3°Rô
ˆ÷
ô 
�ŠÜ
×ÑØT÷
ö 
ô ×1Ò1°sÀÔDˆ÷	
ñ 
÷#
÷ 
üò .÷	
÷ 
ú÷
÷ 
ð 
ús5   ¯DÂ D&ÂD!ÂD&Ã+D9ÄD	Ä!D&Ä&D6	Ä9E
	c            
      óÒ   € \         P                  ! \        P                  R R7      ;_uu_ 4        \        P                  ! R^dR^
^*R7      p RRR4       R#   + '       g   i     R# ; i)z3The parameter beta cannot be smaller or equal to 0.rÖ   rJ  r&  Nrá   )rÙ   rÚ   r!   r   r*  r+  s    r   Útest_negative_beta_S1rM  ¿  sQ   € Ü	�ŠÜ
×ÑÐ U÷
ö 
ô ×1Ò1Ø�s #°2¸Bô
ˆ÷
÷ 
÷ 
ò 
úrè   c                  óv   € \         P                  ! R ^dR^
^*R7      p \         P                  ! V 4      ^ 8”  g   Q hR# )r·   rE  r&  NrF  r+  s    r   Ú*test_non_zero_clustering_beta_lower_one_S1rO  È  s8   € Ü
×-Ò-Ø�C˜s°¸ô	€Aô × Ò  Ó# aÔ'Ð'Ò'r   c                  óÜ   € ^p ^p\         P                  ! R^dRV ^*R7      p\         P                  ! R^dRV^*R7      p\         P                  ! V4      \         P                  ! V4      8”  g   Q hR# )r  g333333ó?r%  r&  N)r!   r*  Únumber_connected_components)Úlow_mean_degreeÚhigh_mean_degreeÚG_lowÚG_highs       r   Ú-test_mean_degree_influence_on_connectivity_S1rV  Ï  su   € Ø€OØÐÜ×1Ò1Ø�C˜s°Àbô€Eô ×2Ò2Ø�C˜sÐ0@Àrô€Fô ×)Ò)¨%Ó0´2×3QÒ3QØó4ô ð ò r   c                  ó¸  € \         P                  ! R ^R^^*R7      p \         P                  ! R ^R^^*R7      p\         P                  ! V R4      p\        VP	                  4       4      \        V4      ,          p\         P                  ! VR4      p\        VP	                  4       4      \        V4      ,          p\        P                  ! W5,
          4      ^8  g   Q hR# )r$  r%  r&  rE  r.  N)r!   r*  r/  r   r6  r#   r.   r7  )ró   rô   Úkappas1Úmean_kappas1Úkappas2Úmean_kappas2s         r   Ú,test_compare_mean_kappas_different_gammas_S1r\  Ý  s®   € Ü	×	.Ò	.Ø�B˜c¨q°rô
€Bô 
×	.Ò	.Ø�B˜c¨q°rô
€Bô ×$Ò$ R¨Ó1€GÜ�w—~‘~Ó'Ó(¬3¨w«<Õ7€LÜ×$Ò$ R¨Ó1€GÜ�w—~‘~Ó'Ó(¬3¨w«<Õ7€LÜ�9Š9�\Õ0Ó1°AÔ5Ð5Ò5r   c                  ó   € \        R ^R7       U Uu/ uF  w  rWbK	  	  pp p\        P                  ! RVR7      p\        VP                   UU u. uF  w  r@V NK	  	  up p4      \        V4      8:  g   Q hR# u upp i u up pi )Úabcde)Ústartr5  r?  N)Ú	enumerater!   r*  Úmaxr9  r#   )rN   rM   r0  r'   Ú_s        r   Ú&test_S1_kappas_mean_degree_from_valuesrc  ë  sk   € ä(¨¸Õ:Ô;Ñ:‘t�qˆaŠdÑ:€FÑ;ä
×-Ò-°3¸vÔF€AÜ˜aŸhšhÔ'™h‘d�a“™hÒ'Ó(¬C°«KÔ7Ð7Ò7ùó <ùó (s   ‘A4ÁA:
)r.   rs   Ú	itertoolsr   rÙ   Únetworkxr!   r   r   ra   r–   r˜   rµ   rÈ   rû   r  r"  r,  r3  r<  rC  rH  rK  rM  rO  rV  r\  rc  rV   r   r   Ú<module>rf     s¬   ðÛ Û Ý "ã ã ò1÷6Fñ 6F÷rEFñ EFòPJ÷"1<ñ 1<÷hFñ F÷4-;ñ -;÷`><ñ ><òB
Rò(òò	ò+ò9òAòEò2
ò(òò6ô8r   