U
    :vf/                     @   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 )    NZnumpyZscipy)havel_hakimi_graphc                   @   s    e Zd Zedd Zdd ZdS )TestBetheHessianc                 C   s(   dddddg}t || _td| _d S )N         r   )r   GnxZ
path_graphP)clsdeg r   K/tmp/pip-unpacked-wheel-_lngutwb/networkx/linalg/tests/test_bethehessian.pysetup_class   s    
zTestBetheHessian.setup_classc                 C   s   t dddgdddgdddgg}dddg}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   Znodelistg      ?N)nparrayZ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
   

