+
    )ie5                         ^ RI t ^ RIt^ RIHt  ! R R4      t ! R R]4      t ! R R]4      t ! R	 R
]]4      t ! R R4      t	 ! R R4      t
R# )    N)edges_equalc                      a  ] tR t^t o ]! ]P                  4      t]P                  t	]! ]P                  P                  4      t]! ]P                  P                  4      t]R 4       tR tR tR tR tRtV tR# )TestSubGraphViewc                n    \         P                  ! ^	V P                  4       R7      V n        0 RmV n        R# )	   create_usingN>         r      r      )nx
path_graphgraphGhide_edges_w_hide_nodes)clss   &g/var/www/html/photoedit/myenv/lib/python3.14/site-packages/networkx/classes/tests/test_subgraphviews.pysetup_classTestSubGraphView.setup_class   s"    aciik:&>#    c                   . ROp\         P                  P                  V4      pV P                  pV! V P                  VR7      pV P                  P
                  VP
                  ,
          ^^08X  g   Q hV P                  P                  VP                  ,
          V P                  8X  g   Q hVP                  4       '       d5   \        V^,          4      . 8X  g   Q h\        V^,          4      ^.8X  g   Q hM5\        V^,          4      ^.8X  g   Q h\        V^,          4      ^^08X  g   Q h\        P                  ! \        VP                  ^4       \        P                  ! \        VP                  ^p4       \        P                  ! \        VP                  ^o4       VP                  ^4      VP!                  4       '       d   ^M^8X  g   Q hVP#                  4       VP!                  4       '       d   ^M^8X  g   Q hR# )r   filter_nodeNr   r   o   )r   filters
hide_nodesgviewr   nodesedgesr   is_directedlistsetpytestraisesKeyError__getitem__degreeis_multigraphsize)selfr!   
nodes_goner"   r   s   &    r   test_hidden_nodes"TestSubGraphView.test_hidden_nodes   si    
ZZ**:6


$&&j1vv||agg%!Q///vv||agg%)E)EEEE==??!:###!:!$$$!:!$$$qt9A&&&hq1hs3hs3xx{AOO$5$5q1===vvx!2!2A:::r   c                   . ROpV P                  V4      pV P                  pV! V P                  VR7      pV P                  P                  VP                  8X  g   Q hVP	                  4       '       d   V P                  P
                  VP
                  ,
          R08X  g   Q h\        V^,          4      . 8X  g   Q h\        VP                  ^,          4      . 8X  g   Q h\        VP                  ^,          4      ^.8X  g   Q hVP                  4       ^8X  g   Q hMaV P                  P
                  VP
                  ,
          RR08X  g   Q h\        V^,          4      ^.8X  g   Q hVP                  4       ^8X  g   Q h\        V^,          4      ^.8X  g   Q h\        P                  ! \        VP                  ^4       \        P                  ! \        VP                  ^4       VP                  ^4      ^8X  g   Q hR#    filter_edgeNr5   r   r8   )      )      )r;   r:   )hide_edges_filterr"   r   r#   r%   r$   r&   predr.   r(   r)   r*   r+   r,   )r/   
hide_edges
edges_goner"   r   s   &    r   test_hidden_edges"TestSubGraphView.test_hidden_edges%   sx   1
++J7


$&&j1vv||qww&&&==??66<<!'')fX555!:###q	?b(((q	?qc)))668q= =66<<!'')ff-====!:!$$$668q= =AaDzaS   hs3hs3xx{ar   c                .   \         P                  P                  . RO4      pV P                  pV! V P                  VR7      p\        VP                  4      ^^08X  g   Q hVP                  4       '       d   \        V^,          4      . 8X  g   Q hM\        V^,          4      ^.8X  g   Q h\        V^,          4      ^.8X  g   Q h\        P                  ! \        VP                  ^4       \        P                  ! \        VP                  ^p4       \        P                  ! \        VP                  ^o4       VP                  ^4      VP                  4       '       d   ^M^8X  g   Q hVP                  4       VP                  4       '       d   ^M^8X  g   Q hR# )r5   r   N)r5   r   r   )r   r    
show_nodesr"   r   r'   r#   r%   r&   r(   r)   r*   r+   r,   r-   r.   )r/   induced_subgraphr"   r   s   &   r   test_shown_node TestSubGraphView.test_shown_node:   s   ::00=

$&&&67177|1v%%%==??!:###!:!$$$AaDzaS   hq1hs3hs3xx{AOO$5$5q1===vvx!2!2A:::r   c                   . ROpV P                  V4      pV P                  V P                  VR7      pV P                  P                  VP                  8X  g   Q hVP	                  4       '       d   VP
                  R08X  g   Q h\        V^,          4      . 8X  g   Q h\        V^,          4      ^.8X  g   Q h\        VP                  ^,          4      ^.8X  g   Q h\        VP                  ^,          4      . 8X  g   Q hVP                  4       ^8X  g   Q hM`VP
                  RR08X  g   Q h\        V^,          4      ^.8X  g   Q h\        V^,          4      ^.8X  g   Q hVP                  4       ^8X  g   Q h\        P                  ! \        VP                  ^4       \        P                  ! \        VP                  ^4       VP                  ^4      ^8X  g   Q hR# r4   )show_edges_filterr"   r   r#   r%   r$   r&   r?   r.   r(   r)   r*   r+   r,   r/   
show_edgesedge_subgraphr   s   &   r   test_shown_edges!TestSubGraphView.test_shown_edgesJ   ss   1
..z:JJtvv=J9vv||qww&&&==??77vh&&&!:###!:!$$$q	?qc)))q	?b(((668q= =77vv....!:!$$$!:!$$$668q= =hs3hs3xx{ar    N)__name__
__module____qualname____firstlineno__staticmethodr   subgraph_viewr"   Graphr   r    r@   r>   rL   rJ   classmethodr   r1   rB   rG   rN   __static_attributes____classdictcell____classdict__s   @r   r   r      ss     ))*EHHE$RZZ%:%:;$RZZ%:%:;? ?;& *;    r   r   c                      a  ] tR t^`t o ]! ]P                  4      t]P                  t	]! ]P                  P                  4      t]! ]P                  P                  4      t. ROt0 RmtR tR tR tRtV tR# )TestSubDiGraphViewc                   V P                  V P                  4      p. ROp\        P                  P	                  V4      pV P                  V P                  W1R7      pV P                  P                  VP                  ,
          V P                  8X  g   Q hV P                  P                  VP                  ,
          V P                  8X  g   Q hR# r   )r   r7   Nr   )
r>   r@   r   r    r!   r"   r   in_edgesexcluded	out_edgesr/   rA   r!   r0   r   s   &    r   test_inoutedges"TestSubDiGraphView.test_inoutedgesh   s    ++DOO<
 
ZZ**:6
JJtvv:JNvv+t}}<<<vv!++->>>r   c                J   V P                  V P                  4      p. ROp\        P                  P	                  V4      pV P                  V P                  W1R7      p\        VP                  ^,          4      ^.8X  g   Q h\        VP                  ^,          4      . 8X  g   Q hR# r`   )	r>   r@   r   r    r!   r"   r   r&   r?   rd   s   &    r   	test_predTestSubDiGraphView.test_predq   s{    ++DOO<
 
ZZ**:6
JJtvv:JNAFF1I1#%%%AFF1I"$$$r   c                z   V P                  V P                  4      p. ROp\        P                  P	                  V4      pV P                  V P                  W1R7      pVP                  ^4      ^8X  g   Q hVP                  ^4      ^ 8X  g   Q hVP                  ^4      ^8X  g   Q hVP                  4       ^8X  g   Q hR# r`   r>   r@   r   r    r!   r"   r   r,   
out_degree	in_degreer.   rd   s   &    r   test_inout_degree$TestSubDiGraphView.test_inout_degreez       ++DOO<
 
ZZ**:6
JJtvv:JNxx{a||A!###{{1~"""vvx1}}r   rP   Nr9   >   r8   r
   r   r   )rQ   rR   rS   rT   rU   r   rV   r"   DiGraphr   r    hide_diedgesr>   show_diedgesrJ   r@   rb   re   rh   rn   rY   rZ   r[   s   @r   r^   r^   `   sf     ))*EJJE$RZZ%<%<=$RZZ%<%<=-J/H?%	 	r   r^   c                      a  ] tR t^t o ]! ]P                  4      t]P                  t	]! ]P                  P                  4      t]! ]P                  P                  4      t]R 4       tR tR tRtV tR# )TestMultiGraphViewc                    \         P                  ! ^	V P                  4       R7      V n        RR0pV P                  P	                  V4       0 RmV n        R# )r   r   Nr5   r   r   )r5   r   r   >   r   r   r   r   r   r   r   r   r   )r   r   r   r   add_edges_fromr   )r   
multiedgess   & r   r   TestMultiGraphView.setup_class   s>    aciik:+
Z(&G#r   c                ,   . ROpV P                  V4      pV P                  V P                  VR7      pV P                  P                  VP                  8X  g   Q hVP	                  4       '       d   V P                  P
                  VP
                  ,
          R08X  g   Q h\        V^,          4      ^.8X  g   Q h\        V^,          4      ^.8X  g   Q h\        VP                  ^,          4      ^.8X  g   Q h\        VP                  ^,          4      ^.8X  g   Q hVP                  4       ^	8X  g   Q hM}V P                  P
                  VP
                  ,
          RR08X  g   Q h\        V^,          4      ^^.8X  g   Q h\        V^,          4      ^^.8X  g   Q hVP                  4       ^8X  g   Q hVP                  ^4      ^8X  g   Q h\        P                  ! \        VP                  ^4       \        P                  ! \        VP                  ^4       R# r5   r6   Nrw   )rw   )r5   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/   r@   rA   r   s   &   r   rB   $TestMultiGraphView.test_hidden_edges   s   E
++J7
JJtvv:J6vv||qww&&&==??66<<!'')i[888!:!$$$!:!$$$q	?qc)))q	?qc)))668q= =66<<!'')i-CCCC!:!Q'''!:!Q'''668q= =xx{ahs3hs3r   c                   . ROpV P                  V4      pV P                  V P                  VR7      pV P                  P                  VP                  8X  g   Q hVP	                  4       '       d   VP
                  R08X  g   Q h\        V^,          4      . 8X  g   Q h\        VP                  ^,          4      ^.8X  g   Q h\        VP                  ^,          4      . 8X  g   Q hVP                  4       ^8X  g   Q hMFVP
                  RR08X  g   Q hVP                  4       ^8X  g   Q h\        V^,          4      ^.8X  g   Q hVP                  ^4      ^8X  g   Q h\        V^,          4      ^.8X  g   Q h\        P                  ! \        VP                  ^4       \        P                  ! \        VP                  ^4       R# r   )rJ   r"   r   r#   r%   r$   r&   r?   r.   r,   r(   r)   r*   r+   rK   s   &   r   rN   #TestMultiGraphView.test_shown_edges   s[   E
..z:JJtvv=J9vv||qww&&&==??77yk)))!:###q	?qc)))q	?b(((668q= =77y)4444668q= =!:!$$$xx{aAaDzaS   hs3hs3r   rP   N)rQ   rR   rS   rT   rU   r   rV   r"   
MultiGraphr   r    hide_multiedgesr>   show_multiedgesrJ   rX   r   rB   rN   rY   rZ   r[   s   @r   ru   ru      sk     ))*EMME$RZZ%?%?@$RZZ%?%?@H H4*4 4r   ru   c                      a  ] tR t^t o ]! ]P                  4      t]P                  t	]! ]P                  P                  4      t]! ]P                  P                  4      t. ROt0 RmtR tRtV tR# )TestMultiDiGraphViewc                z   V P                  V P                  4      p. ROp\        P                  P	                  V4      pV P                  V P                  W1R7      pVP                  ^4      ^8X  g   Q hVP                  ^4      ^8X  g   Q hVP                  ^4      ^8X  g   Q hVP                  4       ^8X  g   Q hR# r`   rk   rd   s   &    r   rn   &TestMultiDiGraphView.test_inout_degree   rp   r   rP   N)r5   r   r   r   r   >   r   rx   ry   rz   )rQ   rR   rS   rT   rU   r   rV   r"   MultiDiGraphr   r    hide_multidiedgesr>   show_multidiedgesrJ   r@   rb   rn   rY   rZ   r[   s   @r   r   r      s\     ))*EOOE$RZZ%A%AB$RZZ%A%AB6J;H	 	r   r   c                   H   a  ] tR t^t o ]R 4       tR tR tR tR t	Rt
V tR# )TestInducedSubGraphc                   \         P                  ! ^4      ;V n        p. VP                  R&   . VP                  ^ ,          R&   VP                  ^^4       . pVP                  ^^VR7       VP                  ^^VR7       R# )r   foo)r   N)r   complete_graphK3r   r#   remove_edgeadd_edge)r   r   lls   &  r   r   TestInducedSubGraph.setup_class   so    &&q))
5	a	

1aR
 	

1aR
 r   c                    V P                   p\        P                  ! V. RO4      pVP                  VP                  8X  g   Q hV P	                  W!4       V P                  W!4       R# )r   N)r      r5   r   )r   r   rF   namegraphs_equalsame_attrdictr/   r   Hs   &  r   test_full_graph#TestInducedSubGraph.test_full_graph   sO    GG<0vv!1 r   c                >   V P                   p\        P                  ! V^ 4      p\        VP                  4      ^ / /8X  g   Q h\        VP                  4      ^ / /8w  g   Q h\        P                  ! V^ ^.4      p\        VP                  4      ^ ^/ /^^ / //8X  g   Q hR# )r   N)r   r   rF   dictadjr   s   &  r   test_partial_subgraph)TestInducedSubGraph.test_partial_subgraph   s    GG1%AEE{q"g%%%AEE{q"g%%%Aq6*AEE{q1b'1q"g6666r   c                   V^,          ^,          R,          pRVP                   R,          R&   VP                   VP                   8X  g   Q hW1P                   R,          R&   VP                   VP                   8X  g   Q hVP                  ^ ,          R,          pRVP                  ^ ,          R&   VP                  VP                  8X  g   Q hW1P                  ^ ,          R&   VP                  VP                  8X  g   Q hR# )r   r   bazN)r   r5   )r$   r#   )r/   r   r   old_foos   &&& r   r   !TestInducedSubGraph.same_attrdict   s    A$q'%.$eww!''!!!&eww!''!!!''!*U#!
5ww!''!!!#
5ww!''!!!r   c                ^   VP                   VP                   8X  g   Q hVP                  VP                  8X  g   Q hVP                  VP                  8X  g   Q hVP                  VP                  8X  g   Q hVP	                  4       '       g   VP	                  4       '       gs   VP                   ^,          ^,          VP                   ^,          ^,          J g   Q hVP                   ^,          ^,          VP                   ^,          ^,          J g   Q hR# VP	                  4       '       g#   VP                   Vn        VP                   Vn        VP	                  4       '       g#   VP                   Vn        VP                   Vn        VP
                  VP
                  8X  g   Q hVP                  VP                  8X  g   Q hVP                  ^,          ^,          VP
                  ^,          ^,          J g   Q hVP                  ^,          ^,          VP
                  ^,          ^,          J g   Q hR# )r   N)_adj_noder   r   r%   _pred_succ)r/   r   r   s   &&&r   r    TestInducedSubGraph.graphs_equal   su   vvww!''!!!ww!''!!!vv}}q}}66!9Q<166!9Q<///66!9Q<166!9Q<///==??&&&&==??&&&&77agg%%%77agg%%%771:a=AGGAJqM111771:a=AGGAJqM111r   rP   N)rQ   rR   rS   rT   rX   r   r   r   r   r   rY   rZ   r[   s   @r   r   r      s0     ! !!7
"2 2r   r   c                      a  ] tR tRt o ]R 4       tR tR tR tR t	R t
R tR	 tR
 t]P                  P!                  R]P$                  ]P&                  34      R 4       tRtV tR# )TestEdgeSubGraphi  c                H   \         P                  ! ^4      ;V n        p\        ^4       F  pRV 2VP                  V,          R&   K  	  RVP
                  R,          R&   RVP
                  R,          R&   RVP                  R&   \         P                  ! VRR.4      V n        R# )	r   noder   edge01edge34r   Nr   r   r
   )	r   r   r   ranger#   r$   r   rM   r   )r   r   is   &  r   r   TestEdgeSubGraph.setup_class  s     MM!$$qA#'sAGGAJv  (f (f!  VV$45r   c                t    . RO\        V P                  P                  P                  R4      4      8X  g   Q hR# )z.Tests that the subgraph has the correct nodes.r   N))r   node0)r   node1)r   node3)r   node4)sortedr   r#   datar/   s   &r   test_correct_nodes#TestEdgeSubGraph.test_correct_nodes  s2    G6FFLLf%L
 
 	
 
r   c                x    \        RR.V P                  P                  P                  R4      4      '       g   Q hR# )z.Tests that the subgraph has the correct edges.r   N)r   r   r   )r   r   r   )r   r   r$   r   r   s   &r   test_correct_edges#TestEdgeSubGraph.test_correct_edges%  s7    /0$&&,,2C2CF2K
 
 	
 
r   c                    V P                   P                  ^4       . RO\        V P                  P                  4      8X  g   Q hV P                   P                  ^4       R# )z[Tests that adding a node to the original graph does not
affect the nodes of the subgraph.

N)r   r   r   r   )r   add_noder   r   r#   remove_noder   s   &r   test_add_nodeTestEdgeSubGraph.test_add_node+  sA    
 	vdffll33331r   c                   V P                   P                  ^ 4       . RO\        V P                  P                  4      8X  g   Q hV P                   P                  ^ RR7       V P                   P                  ^ ^RR7       R# )zUTests that removing a node in the original graph
removes the nodes of the subgraph.

r   )r   r   N)r   r   r   )r   r   r   r   r#   r   r   r   s   &r   test_remove_node!TestEdgeSubGraph.test_remove_node4  s[    
 	1F466<<0000(18,r   c                   V P                    FB  pV P                  P                  V,          V P                   P                  V,          8X  d   KB  Q h	  RV P                  P                  ^ ,          R&   V P                  P                  ^ ,          V P                   P                  ^ ,          8X  g   Q hRV P                   P                  ^,          R&   V P                  P                  ^,          V P                   P                  ^,          8X  g   Q hRV P                  P                  ^ ,          R&   RV P                   P                  ^,          R&   R# )zPTests that the node attribute dictionary of the two graphs is
the same object.

r   r   barr   r   N)r   r   r#   )r/   vs   & r   test_node_attr_dict$TestEdgeSubGraph.test_node_attr_dict>  s    
 A66<<?dffll1o555  #(Qvv||A$&&,,q/111"'Qvv||A$&&,,q/111")Q")Qr   c                   V P                   P                  4        FF  w  rV P                  P                  W3,          V P                   P                  W3,          8X  d   KF  Q h	  RV P                  P                  R,          R&   V P                  P                  R,          R,          V P                   P                  R,          R,          8X  g   Q hRV P                   P                  R,          R&   V P                  P                  R,          R,          V P                   P                  R,          R,          8X  g   Q hRV P                  P                  R,          R&   RV P                   P                  R,          R&   R# )	zPTests that the edge attribute dictionary of the two graphs is
the same object.

r   r   r   r   r   Nr   r
   )r   r$   r   )r/   ur   s   &  r   test_edge_attr_dict$TestEdgeSubGraph.test_edge_attr_dictN  s   
 FFLLNDA66<<%ad);;;; # &+T6"vv||D!&)TVV\\$-?-GGGG%*T6"vv||D!&)TVV\\$-?-GGGG%-T6"%-T6"r   c                f    V P                   P                  V P                  P                  J g   Q hR# )zQTests that the graph attribute dictionary of the two graphs
is the same object.

N)r   r   r   r   s   &r   test_graph_attr_dict%TestEdgeSubGraph.test_graph_attr_dict^  s"    
 vv||tvv||+++r   c                   \         P                  ! \        P                  V P                  P
                  ^4       \         P                  ! \        P                  V P                  P                  ^ 4       \         P                  ! \        P                  V P                  P                  ^^4       \         P                  ! \        P                  V P                  P                  ^ ^4       R# )z9Tests that the subgraph cannot change the graph structureN)	r(   r)   r   NetworkXErrorr   r   r   r   r   r   s   &r   test_readonlyTestEdgeSubGraph.test_readonlye  s    b&&;b&&(:(:A>b&&A>b&&(:(:AqAr   
multigraphc                    V! . RO4      p\         P                  ! VRR.4      pRVR,          9  g   Q hVP                  RR4      '       d   Q hR# )zYCheck edge visibility in FilterMultiInner on edge_subgraph's of
multigraphs. See gh-7724.acN))r   b)r   r   )r   r   )r   r   r   )r   r   r   )r   rM   has_edge)r/   r   r   r   s   &&  r   test_multigraph_filtered_edges/TestEdgeSubGraph.test_multigraph_filtered_edgesl  sR     ;<Q >?!C&   ::c3'''''r   rP   N)rQ   rR   rS   rT   rX   r   r   r   r   r   r   r   r   r   r(   markparametrizer   r   r   r   rY   rZ   r[   s   @r   r   r     ss     
6 
6

-* . ,B [[\BMM2??+KL( M(r   r   )r(   networkxr   networkx.utilsr   r   r^   ru   r   r   r   rP   r   r   <module>r      s^      &V  V r#) #N44) 44p-/A *92 92zb( b(r   