+
    )i6                     ~    ^ RI t ^ RIt] P                  ! R4      t] P                  ! R4        ! R R4      tR tR tR# )    Nnumpyscipyc                   <   a  ] tR t^	t o ]R 4       tR tR tRtV t	R# )TestLaplacianc                   . ROp\         P                  ! V4      V n        \         P                  ! R V P                  P	                  4        4       4      V n        V P
                  P                  ^4       \         P                  ! V P                  4      V n        V P                  P                  4       V n
        V P                  P                  4        F  pV P                  P                  W"4       K   	  \         P                  ! 4       V n        V P                  P                  R4       \         P                   ! V P                  4      V n        \         P                  ! R V P                  P	                  4        4       4      V n        V P                  P                  4       V n        V P&                  P                  4        F  pV P&                  P                  W"4       K   	  R# )   c              3   6   "   T F  w  rWR RRR/3x  K  	  R# 5iweight      ?other333333?N .0uvs   &  b/var/www/html/photoedit/myenv/lib/python3.14/site-packages/networkx/linalg/tests/test_laplacian.py	<genexpr>,TestLaplacian.setup_class.<locals>.<genexpr>   s#      
@MfqQHc7C01   c              3   6   "   T F  w  rWR RRR/3x  K  	  R# 5ir
   r   r   s   &  r   r   r   +   s#      
@OfqQHc7C01r   N)r      r      r   
r   r   r   r   )r   r   )r   r   )r      )   r   )r      )r   r   )r   r    )r    r   )nxhavel_hakimi_graphGGraphedgesWGadd_node
MultiGraphMGcopyGslnodesadd_edgeDiGraphDiGadd_edges_fromMultiDiGraphDiMGDiWGDiGsl)clsdegnodes   &  r   setup_classTestLaplacian.setup_class
   s<   %%c* 
@C
 
 	suu% %%**,GGMMODGGT( $
 **,	
 ??377+:: 
@C
 
 GGLLN	IIOO%DIIt* &    c           	        \         P                  . RO. R	O. R
O. RO. RO.4      pRV,          pRV,          p\         P                  . RO. RO. RO. RO. RO. RO.4      pRV,          pRV,          p\         P                  P                  \        P
                  ! V P                  4      P                  4       V4       \         P                  P                  \        P
                  ! V P                  4      P                  4       V4       \         P                  P                  \        P
                  ! V P                  ^ ^.R7      P                  4       \         P                  ^R.R^..4      4       \         P                  P                  \        P
                  ! V P                  4      P                  4       V4       \         P                  P                  \        P
                  ! V P                  RR7      P                  4       V4       \         P                  P                  \        P
                  ! V P                  RR7      P                  4       V4       \         P                  P                  \        P
                  ! V P                  4      P                  4       V4       \         P                  P                  \        P
                  ! V P                  4      P                  4       V4       \         P                  P                  \        P
                  ! V P                  ^^.R7      P                  4       \         P                  ^R.^ ^ ..4      4       \         P                  P                  \        P
                  ! V P                  4      P                  4       V4       \         P                  P                  \        P
                  ! V P                  RR7      P                  4       V4       \         P                  P                  \        P
                  ! V P                  RR7      P                  4       V4       R# )zGraph Laplacianr   r   nodelistN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   )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   r?   r   r?   )r   r   r   r   r?   r   )nparraytestingassert_equalr!   laplacian_matrixr#   todenser)   r&   r/   r2   r3   )selfNLWLOLDiNLDiWLDiOLs   &      r   test_laplacianTestLaplacian.test_laplacian2   s    XX+++++	- . 2X2Xxx1111113 4 TzTz


 3 3DFF ; C C ErJ


 3 3DGG < D D FK


!Q8@@BHHq"gAw'(	
 	

 3 3DGG < D D FK


 3 3DGGD I Q Q SUWX


8@@BB	
 	

 3 3DHH = E E GN


 3 3DII > F F H$O


Aq6:BBDHHq"g1v&'	
 	

 3 3DII > F F H$O


		$7??A4	
 	

		':BBDd	
r:   c           	     N	   \         P                  . RO. RO. RO. R	O. R
O.4      p\         P                  . RO. RO. RO. R	O. R
O.4      p\         P                  . RO. RO. RO. RO. R
O.4      p\         P                  . RO. RO. RO. RO. RO. RO.4      p\         P                  . RO. RO. RO. RO. RO. RO.4      p\         P                  . RO. RO. RO. RO. RO. RO.4      p\         P                  P                  \        P
                  ! V P                  \        ^4      R7      P                  4       V^R7       \         P                  P                  \        P
                  ! V P                  4      P                  4       V^R7       \         P                  P                  \        P
                  ! V P                  4      P                  4       V^R7       \         P                  P                  \        P
                  ! V P                  4      P                  4       V^R7       \         P                  P                  \        P
                  ! V P                  RR7      P                  4       V^R7       \         P                  P                  \        P
                  ! V P                  4      P                  4       V^R7       \         P                  P                  \        P
                  ! V P                  \        ^^4      R7      P                  4       V^R7       \         P                  P                  \        P
                  ! V P                  4      P                  4       V^R7       \         P                  P                  \        P
                  ! V P                  4      P                  4       V^R7       \         P                  P                  \        P
                  ! V P                  4      P                  4       V^R7       \         P                  P                  \        P
                  ! V P                  RR7      P                  4       V^R7       \         P                  P                  \        P
                  ! V P                  4      P                  4       V^R7       R# )zGeneralized Graph Laplacianr<   decimalr   r>   N)      ?&1ڿrS   X9v        )rS   rR         rU   rU   )rS   rV   rR   rU   rU   )rT   rU   rU   rR   rU   )rU   rU   rU   rU   rU   )      ?登zҿrX   eaֿrU   )rX   K=U?ioTտrU   rU   )rX   r[   rZ   rU   rU   )rY   rU   rU   r   rU   )rR   rU   rڿrU   rU   rU   )rU   rU   rU   rU   rU   rU   )r\   rU   rR   rU   r\   rU   )rU   rU   rU   rR   rV   -)rU   rU   rU   rV   rR   r]   )rU   rU   rU   r]   rU   rR   )r\   rU   rR   r\   rU   rU   )rU   rU   rU   rU   r]   rR   )rZ   gzrX   rU   rU   rU   )rX   rV   rW   rX   rU   rU   )rU   rU   rU   rZ   r[   r\   )rU   rU   rU   r[   rZ   r\   )rU   rU   rU   rU   r\   r   )r@   rA   rB   assert_almost_equalr!   normalized_laplacian_matrixr#   rangerE   r)   r&   r+   r/   r2   r3   r4   )rF   r#   GLLslr/   DiGLDiLsls   &      r   test_normalized_laplacian'TestLaplacian.test_normalized_laplaciana   s    HH;;;;;	= >
 XX?????	A B
 hhEEEEE	G H hhNNNNNNP Q xxOOOOOOQ R PPPPPPR S 	

&&**466E!HEMMO 	' 	

 	

&&**4662::<b! 	' 	
 	

&&**4773;;=r1 	' 	
 	

&&**4773;;=r1 	' 	
 	

&&**4777CKKM 	' 	

 	

&&**4884<<>Q 	' 	
 	

&&**q% gi 	' 	
 	

&&**4884<<>a 	' 	
 	

&&**4995==?q 	' 	
 	

&&**4995==?q 	' 	
 	

&&**499WEMMO 	' 	

 	

&&**4::6>>@%QR 	' 	
r:   r   N)
__name__
__module____qualname____firstlineno__classmethodr8   rM   re   __static_attributes____classdictcell__)__classdict__s   @r   r   r   	   s*     %+ %+N-
^V
 V
r:   r   c            	        \         P                  ! 4       p V P                  R4       \        P	                  . R	O. R
O. RO. RO. RO. RO.4      p\         P
                  ! V R\        V 4      R7      p\        P                  P                  W!^R7       V P                  R4       \        P	                  . RO. RO. RO. RO. RO. RO.4      p\         P
                  ! V R\        V 4      RR7      p\        P                  P                  W!^R7       \        P	                  . RO. RO. RO. RO. RO. RO.4      p\         P
                  ! V R\        V 4      RR7      p\        P                  P                  W!^R7       \         P                  ! 4       p V P                  R4       \        P	                  . RO. RO. RO. R O.4      p\         P
                  ! V R\        V 4      R7      p\        P                  P                  W!^R7       R# )!zDirected Laplacian?alphar=   rP   randomrr   r=   	walk_typelazyNr   )ŏ1w?:pΈҿ*Dؿ\ Ac̝着&}гY)rx   g7d?8gDioͿS!uqGx$(篔ec])ry   r}   rw   PkwǺݵ|г)rz   r~   r   rw   H}8߿\(\)r{   r   r   r   rw   )0ʿ)r|   r   r   r   r   rw   )r   r   )r    r   )rR   @ǘӿfj+޿rU   rU   ,ԚԿ)r   rR   	h"lx¿rU   [<ԿrU   )r   r   rR   rU   o_rU   )rU   rU   rU   rR   rV   rV   )rU   r   r   rV   rR         п)r   rU   rU   rV   r   rR   )r   @ǘÿfj+οrU   rU   TĿ)r   r   ]m{rU   [<ĿrU   )r   r   r   rU   +eXrU   )rU   rU   rU   r   r   r   )rU   r   r   r   r         )r   rU   rU   r   r   r   )r   )r   r   )r   r   r   )r   r   )r   I+ƿr   r   )r   r   rU   r   )r   rU   r   r   )r   r   r   r   )	r!   r.   r0   r@   rA   directed_laplacian_matrixsortedrB   r^   )r#   ra   Ls      r   test_directed_laplacianr      s   
 	

A	
 
IIIIIIK 
LB 	$$QcF1IFAJJ""1!"4 %&	IIIIIIK 
LB 	$$	vayH	A JJ""1!"4 
IIIIIIK 
LB 	$$QcF1IQWXAJJ""1!"4 	

A=>	33335 
6B
 	$$QcF1IFAJJ""1!"4r:   c            	     |   \         P                  ! 4       p V P                  R4       \        P	                  . RO. RO. RO. RO. RO. RO.4      p\         P
                  ! V R\        V 4      R7      p\        P                  P                  W!^R7       V P                  R4       \        P	                  . RO. RO. RO. RO. RO. RO.4      p\         P
                  ! V R\        V 4      RR7      p\        P                  P                  W!^R7       \        P	                  . RO. RO. RO. RO. RO. RO.4      p\         P
                  ! V R\        V 4      RR7      p\        P                  P                  W!^R7       \         P                  ! \         P                  ! ^4      4      p\         P
                  ! V4      p\        P	                  . R O. R!O. R"O. R#O.4      p\        P                  P                  W$^R7       \        P                  ! \         P                  4      ;_uu_ 4        \         P
                  ! V R^dR7       R	R	R	4       \        P                  ! \         P                  4      ;_uu_ 4        \         P
                  ! V R
R7       R	R	R	4       R	#   + '       g   i     L_; i  + '       g   i     R	# ; i)$z Directed combinatorial Laplacianrp   rq   rP   rs   rt   rv   pagerank)ru   rr   Nsilly)ru   r   )g46<?F%uK=U_QkMb`_vOf)r   g
ףp=
?Aǘŏ1w-!a+eylxz,C|)r   r   gZӼ?y&1lSt$r   )r   r   r   g|Pk?z6>W[<Nё\˿)r   r   r   r   gt?B`"۩)r   r   r   r   r   gjt?r   )gB`"?Biޡ+ΧrU   rU   :H)r   g+η?rU   r   rU   )r   r   Biޱ?rU   r   rU   )rU   rU   rU   KY8?KY8Žr   )rU   r   r   r   r   r   )r   rU   rU   r   r   r   )r   5;Nё$ۗrU   rU   rz   )r   g+Χ?wrU   r   rU   )r   r   gBiޡ?rU   r   rU   )rU   rU   rU   KY8Ž?r   r   )rU   r   r   r   r   rz   )rz   rU   rU   r   rz   r   )K}\UU?iKGUUr   rU   )r   r   rU   r   )r   rU   r   r   )rU   r   r   r   )r!   r.   r0   r@   rA   'directed_combinatorial_laplacian_matrixr   rB   r^   margulis_gabber_galil_graphpytestraisesNetworkXError)r#   ra   r   Eexpecteds        r   %test_directed_combinatorial_laplacianr      s   
 	

A	
 
IIIIIIK 
LB 	221C&QR)TAJJ""1!"4 %& 
IIIIIIK 
LB 	22	vayH	A JJ""1!"4 
IIIIIIK 
LB 	22	vayF	A JJ""1!"4


211!45A
2215Axx	=	=	=	=	?H JJ""1":	r''	(	(
221
RUV 
)	r''	(	(
221H 
)	( 
)	(	(	(	(s   &J4J*J'	*J;	)r   networkxr!   importorskipr@   r   r   r   r   r:   r   <module>r      sD     !   G n
 n
bC5LNIr:   