
    Vh                     p    d dl Z d dlZ e j                  d      Z e j                  d        G d d      Zy)    Nnumpyscipyc                   "    e Zd Zed        Zd Zy)TestBetheHessianc                 t    g d}t        j                  |      | _        t        j                  d      | _        y )N)      r	      r   r   )nxhavel_hakimi_graphG
path_graphP)clsdegs     W/home/dcms/DCMS/lib/python3.12/site-packages/networkx/linalg/tests/test_bethehessian.pysetup_classzTestBetheHessian.setup_class
   s)    %%c*a     c                    t         j                  g dg dg dg      }g d}t         j                  j                  t	        j
                  | j                  d      j                         |       t         j                  j                  t	        j
                  | j                  d|      j                         |t         j                  ||                t         j                  j                  t	        j
                  | j                  d      j                         t	        j                  | j                        j                                t         j                  j                  t	        j
                  | j                        j                         t	        j
                  | j                  d	      j                                y
)zBethe Hessian matrix)   r   )r      r   )r   r   r   )r	   r   r
   r	   )r)r   nodelistr
   g      ?N)nparraytestingassert_equalr   bethe_hessian_matrixr   todenseix_r   laplacian_matrix)selfHpermutations      r   test_bethe_hessianz#TestBetheHessian.test_bethe_hessian   s1    HHj! " #  


 7 7! D L L NPQR


##DFFa+FNNPbff[+./	

 	

##DFFa088:'//1	

 	

##DFF+335##DFFd3;;=	
r   N)__name__
__module____qualname__classmethodr   r&    r   r   r   r   	   s    ! !

r   r   )pytestnetworkxr   importorskipr   r   r+   r   r   <module>r/      s7     V!   G 
 
r   