U
    9%e/                     @   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(   dddddg}t || _td| _d S )N         r   )r   GnxZ
path_graphP)clsdeg r   f/var/www/html/Darija-Ai-API/env/lib/python3.8/site-packages/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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
   

