o
    3ήc                     @   sD   d dl Z e d e d d dlZG dd dZG dd dZdS )    Nnumpyscipyc                   @   s$   e Zd Zdd Zdd Zdd ZdS )TestFlowClosenessCentralityc                 C   sR   t d}t |}ddddd}t|D ]}|| tj|| ddks&J qdS )zCloseness centrality: K4   gUUUUUU?r            Hz>absN)nxcomplete_graph!current_flow_closeness_centralitysortedpytestapproxselfGbb_answern r   g/tmp/pip-target-vg8gfxp4/lib/python/networkx/algorithms/centrality/tests/test_current_flow_closeness.pytest_K4
      

 z#TestFlowClosenessCentrality.test_K4c                 C   sR   t d}t |}ddddd}t|D ]}|| tj|| ddks&J qdS )zCloseness centrality: P4r   gUUUUUU?g      ?r   r
   r   N)r   
path_graphr   r   r   r   r   r   r   r   test_P4   r   z#TestFlowClosenessCentrality.test_P4c                 C   s`   t  }t |g d t |}ddddd}t|D ]}|| tj|| ddks-J qdS )zCloseness centrality: star)ar   cdgUUUUUU?g?r
   r   N)r   Graphadd_starr   r   r   r   r   r   r   r   	test_star   s   
 z%TestFlowClosenessCentrality.test_starN)__name__
__module____qualname__r   r   r$   r   r   r   r   r   	   s    r   c                   @   s   e Zd ZdS )#TestWeightedFlowClosenessCentralityN)r%   r&   r'   r   r   r   r   r(   $   s    r(   )r   importorskipnetworkxr   r   r(   r   r   r   r   <module>   s    

