+
    �°³jS  ã                   óf   € R t ^ RIHt ^ RIt^ RIt^ RIHt ^ RIH	t	  ! R R4      t
 ! R R4      tR# )	z>Unit tests for the :mod:`networkx.algorithms.boundary` module.)ÚcombinationsN)Úconvert_node_labels_to_integers)Úedges_equalc                   óN   a € ] tR t^t o RtR tR tR tR tR t	R t
R tR	tV tR
# )ÚTestNodeBoundaryz<Unit tests for the :func:`~networkx.node_boundary` function.c                óÆ  € \         P                  ! 4       p\         P                  ! V. 4      \        4       8X  g   Q h\         P                  ! V. . 4      \        4       8X  g   Q h\         P                  ! V. RO4      \        4       8X  g   Q h\         P                  ! V. RO. RO4      \        4       8X  g   Q h\         P                  ! V. RO. RO4      \        4       8X  g   Q hR# )z4Tests that the null graph has empty node boundaries.N©é   é   é   ©é   é   é   ©r   r   r   )ÚnxÚ
null_graphÚnode_boundaryÚset©ÚselfÚnulls   & Úh/home/luca/screen-checking/.venv/lib/python3.14/site-packages/networkx/algorithms/tests/test_boundary.pyÚtest_null_graphÚ TestNodeBoundary.test_null_graph   s¤   € ä�}Š}‹ˆÜ×Ò  bÓ)¬S«UÔ2Ð2Ð2Ü×Ò  b¨"Ó-´³Ô6Ð6Ð6Ü×Ò ¢iÓ0´C³EÔ9Ð9Ð9Ü×Ò ¢i²Ó;¼s»uÔDÐDÐDÜ×Ò ¢i²Ó;¼s»uÔDÐDÒDó    c                óD  € \        \        P                  ! ^
4      ^R7      p\        P                  ! V. 4      \	        4       8X  g   Q h\        P                  ! V. . 4      \	        4       8X  g   Q h\        P                  ! V. RO4      ^08X  g   Q h\        P                  ! V. RO4      ^^08X  g   Q h\        P                  ! V. RO4      ^^08X  g   Q h\        P                  ! V. RO4      ^08X  g   Q h\        P                  ! V. RO^	^
.4      \	        4       8X  g   Q hR# )é
   ©Úfirst_labelNr   r   ©r   r   r   r   é   ©é   é	   r   )Úcnltir   Ú
path_graphr   r   ©r   ÚP10s   & r   Útest_path_graphÚ TestNodeBoundary.test_path_graph   sî   € Ü”B—M’M "Ó%°1Ô5ˆÜ×Ò  RÓ(¬C«EÔ1Ð1Ð1Ü×Ò  R¨Ó,´³Ô5Ð5Ð5Ü×Ò ¢YÓ/°A°3Ô6Ð6Ð6Ü×Ò ¢YÓ/°A°q°6Ô9Ð9Ð9Ü×Ò ¢_Ó5¸!¸Q¸Ô?Ð?Ð?Ü×Ò ¢ZÓ0°Q°CÔ7Ð7Ð7Ü×Ò ¢Y°°B°Ó8¼C»EÔAÐAÒAr   c                ó”  € \        \        P                  ! ^
4      ^R7      p\        P                  ! V. 4      \	        4       8X  g   Q h\        P                  ! V. . 4      \	        4       8X  g   Q h\        P                  ! V. RO4      0 Rm8X  g   Q h\        P                  ! V. RO4      0 Rm8X  g   Q h\        P                  ! V. RO4      0 Rm8X  g   Q h\        P                  ! V. RO. 4      \	        4       8X  g   Q h\        P                  ! W4      \	        4       8X  g   Q h\        P                  ! V. RO. R	O4      ^^08X  g   Q hR# )
r   r   Nr   >   r   r   r   r!   r#   r$   r   r   >   r	   r
   r   r!   r#   r$   r   r    >   r	   r
   r#   r$   r   r   )r%   r   Úcomplete_graphr   r   )r   ÚK10s   & r   Útest_complete_graphÚ$TestNodeBoundary.test_complete_graph"   s  € Ü”B×%Ò% bÓ)°qÔ9ˆÜ×Ò  RÓ(¬C«EÔ1Ð1Ð1Ü×Ò  R¨Ó,´³Ô5Ð5Ð5Ü×Ò ¢YÓ/Ò3IÔIÐIÐIÜ×Ò ¢YÓ/Ò3IÔIÐIÐIÜ×Ò ¢_Ó5Ò9IÔIÐIÐIÜ×Ò ¢Y°Ó3´s³uÔ<Ð<Ð<Ü×Ò Ó)¬S«UÔ2Ð2Ð2Ü×Ò ¢Y²	Ó:¸qÀ!¸fÔDÐDÒDr   c                ó²  € R p\         P                  ! 4       pV! V^4      \        P                  ! RRR7      8X  g   Q hV! V^4      \        P                  ! RRR7      8X  g   Q hV! V^4      \        P                  ! RRR7      8X  g   Q hV! V^4      \        P                  ! RRR7      8X  g   Q hV! V^4      \        P                  ! RRR7      8X  g   Q hR	# )
zaCheck boundaries in the petersen graph

cheeger(G,k)=min(|bdy(S)|/|S| for |S|=k, 0<k<=|V(G)|/2)

c                 óF   a a€ \        V V3R  l\        S S4       4       4      # )c              3   ór   <"  € T F,  p\        \        P                  ! SV4      4      S,          x € K.  	  R # 5i)N)Úlenr   r   )Ú.0ÚnnÚGÚks   & €€r   Ú	<genexpr>ÚBTestNodeBoundary.test_petersen.<locals>.cheeger.<locals>.<genexpr>5   s-   øé € ÐUÑBT¸B”sœ2×+Ò+¨A¨rÓ2Ó3°a×7Ò7ÓBTùs   ƒ47)Úminr   )r6   r7   s   ffr   ÚcheegerÚ/TestNodeBoundary.test_petersen.<locals>.cheeger4   s   ù€ ÜÕUÄ,ÈqÐRSÔBTÓUÓUÐUr   g      @g{®Gáz„?)Úabsg       @g¸…ëQ¸ú?g      ð?gš™™™™™é?N)r   Úpetersen_graphÚpytestÚapprox)r   r;   ÚPs   &  r   Útest_petersenÚTestNodeBoundary.test_petersen-   s³   € ò	Vô ×ÒÓˆÙ�q˜!‹}¤§¢¨d¸Ô =Ô=Ð=Ð=Ù�q˜!‹}¤§¢¨d¸Ô =Ô=Ð=Ð=Ù�q˜!‹}¤§¢¨d¸Ô =Ô=Ð=Ð=Ù�q˜!‹}¤§¢¨d¸Ô =Ô=Ð=Ð=Ù�q˜!‹}¤§¢¨d¸Ô =Ô=Ð=Ò=r   c                ó€   € \         P                  ! . RO4      p^ ^0p\         P                  ! W4      p^0pW48X  g   Q hR# )z,Tests the node boundary of a directed graph.N©)é    r	   ©r	   r
   ©r
   r   ©r   r   )r   rF   )r   ÚDiGraphr   ©r   r6   ÚSÚboundaryÚexpecteds   &    r   Útest_directedÚTestNodeBoundary.test_directed>   s=   € ä�JŠJÒ?Ó@ˆØ�ˆFˆÜ×#Ò# AÓ)ˆØ�3ˆØÔ#Ð#Ò#r   c                óâ   € \         P                  ! \        \         P                  ! ^4      P	                  4       4      ^,          4      p^ ^0p\         P
                  ! W4      p^^0pW48X  g   Q hR# )z(Tests the node boundary of a multigraph.N)r   Ú
MultiGraphÚlistÚcycle_graphÚedgesr   rK   s   &    r   Útest_multigraphÚ TestNodeBoundary.test_multigraphF   sZ   € ä�MŠMœ$œrŸ~š~¨aÓ0×6Ñ6Ó8Ó9¸AÕ=Ó>ˆØ�ˆFˆÜ×#Ò# AÓ)ˆØ�q�6ˆØÔ#Ð#Ò#r   c                ó’   € . ROp\         P                  ! V^,          4      p^ ^0p\         P                  ! W#4      p^0pWE8X  g   Q hR# )ú*Tests the edge boundary of a multidigraph.NrE   )r   ÚMultiDiGraphr   ©r   rU   r6   rL   rM   rN   s   &     r   Útest_multidigraphÚ"TestNodeBoundary.test_multidigraphN   sE   € â8ˆÜ�OŠO˜E A�IÓ&ˆØ�ˆFˆÜ×#Ò# AÓ)ˆØ�3ˆØÔ#Ð#Ò#r   © N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   r)   r.   rB   rO   rV   r\   Ú__static_attributes__Ú__classdictcell__©Ú__classdict__s   @r   r   r      s3   ø‡ € ÙFòEòBò	Eò>ò"$ò$÷$ð $r   r   c                   óH   a € ] tR t^Xt o RtR tR tR tR tR t	R t
RtV tR	# )
ÚTestEdgeBoundaryz<Unit tests for the :func:`~networkx.edge_boundary` function.c                óÐ  € \         P                  ! 4       p\        \         P                  ! V. 4      4      . 8X  g   Q h\        \         P                  ! V. . 4      4      . 8X  g   Q h\        \         P                  ! V. RO4      4      . 8X  g   Q h\        \         P                  ! V. RO. RO4      4      . 8X  g   Q h\        \         P                  ! V. RO. RO4      4      . 8X  g   Q hR# )r	   Nr   r   r   )r   r   rS   Úedge_boundaryr   s   & r   r   Ú TestEdgeBoundary.test_null_graph[   s³   € Ü�}Š}‹ˆÜ”B×$Ò$ T¨2Ó.Ó/°2Ô5Ð5Ð5Ü”B×$Ò$ T¨2¨rÓ2Ó3°rÔ9Ð9Ð9Ü”B×$Ò$ Tª9Ó5Ó6¸"Ô<Ð<Ð<Ü”B×$Ò$ Tª9²iÓ@ÓAÀRÔGÐGÐGÜ”B×$Ò$ Tª9²iÓ@ÓAÀRÔGÐGÒGr   c                óî  € \        \        P                  ! ^
4      ^R7      p\        \        P                  ! V. 4      4      . 8X  g   Q h\        \        P                  ! V. . 4      4      . 8X  g   Q h\        \        P                  ! V. RO4      4      R.8X  g   Q h\        \        P                  ! V. RO4      4      RR.8X  g   Q h\        \        P                  ! V. RO4      4      R	R
.8X  g   Q h\        \        P                  ! V. RO4      4      R.8X  g   Q h\        \        P                  ! V. RO^	^
.4      4      . 8X  g   Q h\        \        P                  ! V. RO. RO4      4      RR.8X  g   Q hR# )r   r   Nr   rI   r   )r   r   )r   r!   r    )r   r
   )r!   r#   r"   )r#   r!   r   rH   )r%   r   r&   rS   rk   Úsortedr'   s   & r   r)   Ú TestEdgeBoundary.test_path_graphc   s4  € Ü”B—M’M "Ó%°1Ô5ˆÜ”B×$Ò$ S¨"Ó-Ó.°"Ô4Ð4Ð4Ü”B×$Ò$ S¨"¨bÓ1Ó2°bÔ8Ð8Ð8Ü”B×$Ò$ Sª)Ó4Ó5¸&¸ÔAÐAÐAÜ”b×&Ò& sªIÓ6Ó7¸FÀFÐ;KÔKÐKÐKÜ”b×&Ò& sªOÓ<Ó=À&È&ÐAQÔQÐQÐQÜ”B×$Ò$ Sª*Ó5Ó6¸6¸(ÔBÐBÐBÜ”b×&Ò& sªI¸¸2°wÓ?Ó@ÀBÔFÐFÐFÜ”B×$Ò$ Sª)²YÓ?Ó@ÀVÈVÐDTÔTÐTÒTr   c                óÜ  € \        \        P                  ! ^
4      ^R7      pR p\        \        P                  ! V. 4      4      . 8X  g   Q h\        \        P                  ! V. . 4      4      . 8X  g   Q hV! \        P                  ! V. RO4      4      ^8X  g   Q hV! \        P                  ! V. RO4      4      ^8X  g   Q hV! \        P                  ! V. RO4      4      ^8X  g   Q hV! \        P                  ! V. RO4      4      ^8X  g   Q h\        \        P                  ! V. RO^	^
.4      . R	O4      '       g   Q h\        \        P                  ! V. RO. R
O4      . RO4      '       g   Q hR# )r   r   c                 ó&   € \        R  V  4       4      # )c              3   ó&   "  € T F  p^x € K	  	  R# 5i)r	   Nr^   )r4   Úis   & r   r8   ÚETestEdgeBoundary.test_complete_graph.<locals>.ilen.<locals>.<genexpr>r   s   é € Ð+¡(˜Q•q£(ùs   ‚)Úsum)Úiterables   &r   ÚilenÚ2TestEdgeBoundary.test_complete_graph.<locals>.ilenq   s   € ÜÑ+¡(Ó+Ó+Ð+r   Nr   )r   r   r   r!   r    r"   r   ))r   r$   )r   r   )r   r$   )r   r   )r   r$   )r   r   r   ))r	   r   )r	   r   )r	   r   rH   )r
   r   )r
   r   rI   )r   r   )r%   r   r,   rS   rk   r   )r   r-   rw   s   &  r   r.   Ú$TestEdgeBoundary.test_complete_graphn   s@  € Ü”B×%Ò% bÓ)°qÔ9ˆò	,ô ”B×$Ò$ S¨"Ó-Ó.°"Ô4Ð4Ð4Ü”B×$Ò$ S¨"¨bÓ1Ó2°bÔ8Ð8Ð8Ù”B×$Ò$ Sª)Ó4Ó5¸Ô;Ð;Ð;Ù”B×$Ò$ Sª,Ó7Ó8¸BÔ>Ð>Ð>Ù”B×$Ò$ Sª/Ó:Ó;¸rÔAÐAÐAÙ”B×$Ò$ Sª*Ó5Ó6¸"Ô<Ð<Ð<ÜÜ×Ò˜S¢)¨a°¨WÓ5Ú?÷
ò 
ð 	
ð 
ô Ü×Ò˜S¢)ªYÓ7ÚL÷
ò 
ð 	
ò 
r   c                ó’   € \         P                  ! . RO4      p^ ^0p\        \         P                  ! W4      4      pR.pW48X  g   Q hR# )z,Tests the edge boundary of a directed graph.NrG   rE   )r   rJ   rS   rk   rK   s   &    r   rO   ÚTestEdgeBoundary.test_directedƒ   sB   € ä�JŠJÒ?Ó@ˆØ�ˆFˆÜœ×(Ò(¨Ó.Ó/ˆØ�8ˆØÔ#Ð#Ò#r   c                óô   € \         P                  ! \        \         P                  ! ^4      P	                  4       4      ^,          4      p^ ^0p\        \         P
                  ! W4      4      p. ROpW48X  g   Q hR# )z(Tests the edge boundary of a multigraph.N)©rF   r   r}   rG   rG   )r   rR   rS   rT   rU   rk   rK   s   &    r   rV   Ú TestEdgeBoundary.test_multigraph‹   s[   € ä�MŠMœ$œrŸ~š~¨aÓ0×6Ñ6Ó8Ó9¸AÕ=Ó>ˆØ�ˆFˆÜœ×(Ò(¨Ó.Ó/ˆÚ3ˆØÔ#Ð#Ò#r   c                ó¦   € . ROp\         P                  ! V^,          4      p^ ^0p\        \         P                  ! W#4      4      pRR.pWE8X  g   Q hR# )rY   NrG   rE   )r   rZ   rS   rk   r[   s   &     r   r\   Ú"TestEdgeBoundary.test_multidigraph“   sM   € â8ˆÜ�OŠO˜E A�IÓ&ˆØ�ˆFˆÜœ×(Ò(¨Ó.Ó/ˆØ˜FÐ#ˆØÔ#Ð#Ò#r   r^   N)r_   r`   ra   rb   rc   r   r)   r.   rO   rV   r\   rd   re   rf   s   @r   ri   ri   X   s-   ø‡ € ÙFòHò	Uò
ò*$ò$÷$ð $r   ri   )rc   Ú	itertoolsr   r?   Únetworkxr   r   r%   Únetworkx.utilsr   r   ri   r^   r   r   Ú<module>r„      s0   ðÙ Då "ã ã Ý =Ý &÷I$ñ I$÷XB$ó B$r   