o
    ]Zh/                     @   sB   d dl Z e dZe d d dlZd dlmZ G dd dZdS )    NnumpyZscipy)havel_hakimi_graphc                   @   s    e Zd Zedd Zdd ZdS )TestBetheHessianc                 C   s"   g d}t || _td| _d S )N)      r      r   r   )r   GnxZ
path_graphP)clsdeg r   V/var/www/auris/lib/python3.10/site-packages/networkx/linalg/tests/test_bethehessian.pysetup_class   s   
zTestBetheHessian.setup_classc                 C   s   t g dg dg dg}g d}t jtj| jdd | t jtj| jd|d |t ||  t jtj| j	dd t
| j	  t jt| j	 tj| j	d	d  d
S )zBethe Hessian matrix)   r   )r      r   )r   r   r   )r   r   r   r   )r)r   Znodelistr   g      ?N)nparraytestingZassert_equalr	   Zbethe_hessian_matrixr
   ZtodenseZix_r   Zlaplacian_matrix)selfHZpermutationr   r   r   test_bethe_hessian   s$   
z#TestBetheHessian.test_bethe_hessianN)__name__
__module____qualname__classmethodr   r   r   r   r   r   r   
   s    
r   )ZpytestZimportorskipr   Znetworkxr	   Znetworkx.generators.degree_seqr   r   r   r   r   r   <module>   s    

