
    Vh                     B    d Z ddlZddlZd Zd Zd Zd Zd Zd Z	d	 Z
y)
zAUnit tests for the :mod:`networkx.generators.time_series` module.    Nc                  \    t        j                  g       } t        j                  |       sJ y )N)nxvisibility_graphis_empty)
null_graphs    Z/home/dcms/DCMS/lib/python3.12/site-packages/networkx/generators/tests/test_time_series.py0test_visibility_graph__empty_series__empty_graphr	      s$    $$R(J;;z"""    c                      t        j                  dg      } | j                         dk(  sJ | j                         dk(  sJ y )N
      r   )r   r   number_of_nodesnumber_of_edges)
node_graphs    r   9test_visibility_graph__single_value_ts__single_node_graphr      sB    $$bT*J%%'1,,,%%'1,,,r
   c                  h    t        j                  ddg      } t        | j                        dgk(  sJ y )Nr      )r   r   )r   r   listedges)
edge_graphs    r   7test_visibility_graph__two_values_ts__single_edge_graphr      s1    $$b"X.J
  !fX---r
   c                  .   t        d      D  cg c]  } | dz  	 }} t        |      }t        j                  |      }|j	                         |k(  sJ |j                         dk(  sJ t        j                  |t        j                  |            sJ y c c} w )Nr      -   )rangelenr   r   r   r   is_isomorphiccomplete_graph)iseriesexpected_series_lengthactual_graphs       r   4test_visibility_graph__convex_series__complete_graphr#      s    !"I&qad&F& [&&v.L'')-CCCC'')R///L"*;*;<R*STTT 's   Bc                  6   t        d      D  cg c]  } | dz   
 }} t        |      }t        j                  |      }|j	                         |k(  sJ |j                         |dz
  k(  sJ t        j                  |t        j                  |            sJ y c c} w )Nr   r   r   )r   r   r   r   r   r   r   
path_graph)r   r    expected_node_countr"   s       r   1test_visibility_graph__concave_series__path_graphr'   #   s    $Ry)!1g)F)f+&&v.L'')-@@@@'')-@1-DDDDL"--8K*LMMM *s   Bc                      dgdz  } t        |       }t        j                  |       }|j                         |k(  sJ |j	                         |dz
  k(  sJ t        j
                  |t        j                  |            sJ y )Nr   r   r   )r   r   r   r   r   r   r%   r    r&   r"   s      r   .test_visibility_graph__flat_series__path_graphr*   .   s|    S2XFf+&&v.L'')-@@@@'')-@1-DDDDL"--8K*LMMMr
   c                      t        t        j                  t        j                  d      d            } t	        |       }t        j                  |       }|j                         |k(  sJ |j                         dk(  sJ y )N)r   r            )	r   	itertoolsislicecycler   r   r   r   r   r)   s      r   #test_visibility_graph_cyclic_seriesr2   9   sk    )""9??9#=rBCFf+&&v.L'')-@@@@'')R///r
   )__doc__r/   networkxr   r	   r   r   r#   r'   r*   r2    r
   r   <module>r6      s4    G  #
-.
UNN0r
   