
    Ug                         d dl Zd dlZd dlmZ d dlmZ d dlmZm	Z	m
Z
mZ d Zd Zd Zd Zej                            d	d
dg          ej                            dee	g          d                         ZdS )    N)assert_array_almost_equal)	csr_array)breadth_first_treedepth_first_treecsgraph_to_densecsgraph_from_densec                     t          j        g dg dg dg dg dg          } t          | d          } t          j        g dg dg d	g d
g d
g          }dD ]0}t          | d|          }t	          t          |          |           1d S )Nr         r   r   r   r   r   r      r   r   r      r   r   r   r   r   r   r   r   r   r   r   r   
null_valuer   r   r   r   r   )r   r   r   r   r   r   r   r   r   r   TFnparrayr   r   r   r   csgraphbfirstdirectedbfirst_tests       h/var/www/surfInsights/venv3-11/lib/python3.11/site-packages/scipy/sparse/csgraph/tests/test_traversal.pytest_graph_breadth_firstr!   	   s    h''''	) * *G
 !Q777GX&&&&	( ) )F " * *(!X>>!"2;"?"?"(	* 	* 	* 	** *    c                     t          j        g dg dg dg dg dg          } t          | d          } t          j        g dg d	g d
g dg dg          }dD ]0}t          | d|          }t	          t          |          |           1d S )Nr
   r   r   r   r   r   r   )r   r   r   r   r   r   r   )r   r   r   r   r   )r   r   r   r   r   r   r   r   r   r   r   r   )r   dfirstr   dfirst_tests       r    test_graph_depth_firstr'      s    h''''	) * *G
 !Q777GX&&&&	( ) )F " * *&w8<<!"2;"?"?"(	* 	* 	* 	** *r"   c                      t          j        dgg          } t          | d          } t          j        dgg          }dD ]0}t          | d|          }t	          t          |          |           1d S Nr   r   r   r   r   s       r    &test_graph_breadth_first_trivial_graphr*   1   s    huooG Q777GXse__F! * *(!X>>!"2;"?"?"(	* 	* 	* 	** *r"   c                      t          j        dgg          } t          | d          } t          j        dgg          }dD ]0}t          | d|          }t	          t          |          |           1d S r)   r$   r   s       r    $test_graph_depth_first_trivial_graphr,   =   s    huooG Q777GXse__F! * *&w8<<!"2;"?"?"(	* 	* 	* 	** *r"   r   TF	tree_funcc                    t          dgt          j        dgdggt          j                  fd          }|j        j        t          j        k    sJ  | |d|          }t          t          |          ddgddgg           d S )Nr   r   )dtype)r   r   )shape)r   )r   r   r   int64indicesr/   r   r   )r-   r   gtrees       r    test_int64_indicesr5   I   s     	A31#s28<<<=VLLLA9?bh&&&&9QH---D.t441v1v6FGGGGGr"   )numpyr   pytestnumpy.testingr   scipy.sparser   scipy.sparse.csgraphr   r   r   r   r!   r'   r*   r,   markparametrizer5    r"   r    <module>r>      s        3 3 3 3 3 3 " " " " " "* * * * * * * * * * * ** * *(* * *(	* 	* 	*	* 	* 	* dE]33'9;K&LMMH H NM 43H H Hr"   