o
    3Î®cv  ã                   @   s&   d dl Zd dlm  mZ dd„ ZdS )é    Nc                  C   s<  t  d¡} t | ¡\}}t  |  |¡¡}|dksJ dƒ‚t  |  |¡¡}|dks,J dƒ‚t  ¡ } t | ¡\}}|dhks@J dƒ‚|dhksIJ dƒ‚t  ddt  ¡ ¡} t | ¡\}}t  |  |¡¡}|dksiJ dƒ‚t  |  |¡¡}|dksyJ dƒ‚|  	dd	„ t
dt| ƒd
ƒD ƒ¡ t | ¡\}}||ks–J ‚||ksœJ ‚d S )Né
   g      ð?z%clique not correctly found by ramsey!g        z$i-set not correctly found by ramsey!r   é   c                 S   s   g | ]}||f‘qS © r   )Ú.0Únr   r   úZ/tmp/pip-target-vg8gfxp4/lib/python/networkx/algorithms/approximation/tests/test_ramsey.pyÚ
<listcomp>   s    ztest_ramsey.<locals>.<listcomp>é   )ÚnxÚcomplete_graphÚapxaÚ	ramsey_R2ÚdensityÚsubgraphÚtrivial_graphÚbarbell_graphÚGraphÚadd_edges_fromÚrangeÚlen)ÚgraphÚcÚiÚcdensÚidensÚccÚiir   r   r   Útest_ramsey   s(   
 r   )Únetworkxr
   Ú!networkx.algorithms.approximationÚ
algorithmsÚapproximationr   r   r   r   r   r   Ú<module>   s    