
    \Mh                     p    d dl Z d dlZ e j        d          Z e j        d            G d d          ZdS )    Nnumpyscipyc                   *    e Zd Zed             Zd ZdS )TestBetheHessianc                 r    g d}t          j        |          | _        t          j        d          | _        d S )N)      r	      r   r   )nxhavel_hakimi_graphG
path_graphP)clsdegs     g/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/networkx/linalg/tests/test_bethehessian.pysetup_classzTestBetheHessian.setup_class
   s2    oo%c**a      c                    t                               g dg dg dg          }g d}t           j                            t	          j        | j        d                                          |           t           j                            t	          j        | j        d|                                          |t                               ||                              t           j                            t	          j        | j	        d                                          t	          j
        | j	                                                             t           j                            t	          j        | j	                                                  t	          j        | j	        d	                                                     d
S )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   s    HHjjj!kk jj" # #  ii

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

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

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

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