Sindbad~EG File Manager

Current Path : /usr/local/lib/python3.12/site-packages/pip/_vendor/resolvelib/__pycache__/
Upload File :
Current File : //usr/local/lib/python3.12/site-packages/pip/_vendor/resolvelib/__pycache__/structs.cpython-312.pyc

�

4Μgc���ddlZddlmZGd�de�ZGd�dej
�ZGd�d	e�ZGd
�de�Zd�Z	y)
�N�)�collections_abcc�X�eZdZdZd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zy)�
DirectedGraphz&A graph structure with directed edges.c�>�t�|_i|_i|_y�N)�set�	_vertices�	_forwards�
_backwards��selfs �I/usr/local/lib/python3.12/site-packages/pip/_vendor/resolvelib/structs.py�__init__zDirectedGraph.__init__	s������������c�,�t|j�Sr)�iterr
r
s r�__iter__zDirectedGraph.__iter__����D�N�N�#�#rc�,�t|j�Sr)�lenr
r
s r�__len__zDirectedGraph.__len__s���4�>�>�"�"rc��||jvSr)r
�r�keys  r�__contains__zDirectedGraph.__contains__s���d�n�n�$�$rc�V�t�}t|j�|_|jj	�D��cic]\}}|t|���c}}|_|j
j	�D��cic]\}}|t|���c}}|_|Scc}}wcc}}w)z$Return a shallow copy of this graph.)rr	r
r�itemsr)r�other�k�vs    r�copyzDirectedGraph.copys�������d�n�n�-���15���1E�1E�1G�H�1G���A�1�c�!�f�9�1G�H���26�/�/�2G�2G�2I�J�2I�$�!�Q�A�s�1�v�I�2I�J������I��Js�B�>B%c���||jvrtd��|jj|�t�|j|<t�|j
|<y)zAdd a new vertex to the graph.z
vertex existsN)r
�
ValueError�addr	rrrs  rr%zDirectedGraph.addsK���$�.�.� ��_�-�-������3��!�e����s��"�u�����rc�2�|jj|�|jj|�D] }|j|j|��"|jj|�D] }|j|j|��"y)zCRemove a vertex from the graph, disconnecting all edges from/to it.N)r
�remover�popr)rr�f�ts    rr'zDirectedGraph.remove'st�������c�"����#�#�C�(�A��O�O�A��%�%�c�*�)����$�$�S�)�A��N�N�1��$�$�S�)�*rc�J�||j|vxr||j|vSr)rr�rr)r*s   r�	connectedzDirectedGraph.connected/s)���D�O�O�A�&�&�A�1����q�0A�+A�Arc��||jvrt|��|j|j|�|j|j|�y)zgConnect two existing vertices.

        Nothing happens if the vertices are already connected.
        N)r
�KeyErrorrr%rr,s   r�connectzDirectedGraph.connect2sH��

�D�N�N�"��1�+�����q����a� ��������q�!rc#�jK�|jj�D]\}}|D]}||f���
�y�wr)rr)rr)�childrenr*s    r�
iter_edgeszDirectedGraph.iter_edges<s4�����>�>�/�/�1�K�A�x�����d�
��2�s�13c�2�t|j|�Sr)rrrs  r�
iter_childrenzDirectedGraph.iter_childrenAs���D�N�N�3�'�(�(rc�2�t|j|�Sr)rrrs  r�iter_parentszDirectedGraph.iter_parentsDs���D�O�O�C�(�)�)rN)�__name__�
__module__�__qualname__�__doc__rrrrr"r%r'r-r0r3r5r7�rrrrsB��0��
$�#�%��%�*�B�"��
)�*rrc�<�eZdZd	d�Zd�Zd�ZeZd�Zd�Zd�Z	d�Z
y)
�IteratorMappingNc�6�||_||_|xsi|_yr)�_mapping�	_accessor�_appends)r�mapping�accessor�appendss    rrzIteratorMapping.__init__Is����
�!����
�2��
rc�d�dj|j|j|j�S)Nz!IteratorMapping({!r}, {!r}, {!r}))�formatr@rArBr
s r�__repr__zIteratorMapping.__repr__Ns*��2�9�9��M�M��N�N��M�M�
�	
rc�H�t|jxs|j�Sr)�boolr@rBr
s r�__bool__zIteratorMapping.__bool__Us���D�M�M�2�T�]�]�3�3rc�>�||jvxs||jvSr)r@rBrs  rrzIteratorMapping.__contains__Zs���d�m�m�#�;�s�d�m�m�';�;rc���	|j|}t	j
|j
|�|jj|d��S#t$rt|j|�cYSwxYw)Nr<)r@r/rrB�	itertools�chainrA�get)rr r!s   r�__getitem__zIteratorMapping.__getitem__]sg��	*��
�
�a� �A����t�~�~�a�0�$�-�-�2C�2C�A�r�2J�K�K���	*���
�
�a�(�)�)�	*�s�A�!A4�3A4c�n���fd��jD�}tj�j|�S)Nc3�@�K�|]}|�jvs�|���y�wr�r@��.0r rs  �r�	<genexpr>z+IteratorMapping.__iter__.<locals>.<genexpr>es�����C�=�a�A�T�]�]�,B��=����)rBrNrOr@�r�mores` rrzIteratorMapping.__iter__ds&���C�4�=�=�C�����t�}�}�d�3�3rc�p��t�fd��jD��}t�j�|zS)Nc3�@�K�|]}|�jvs�d���y�w)rNrTrUs  �rrWz*IteratorMapping.__len__.<locals>.<genexpr>is�����F�m��q��
�
�/E�1�m�rX)�sumrBrr@rYs` rrzIteratorMapping.__len__hs+����F�d�m�m�F�F���4�=�=�!�D�(�(rr)r8r9r:rrHrK�__nonzero__rrQrrr<rrr>r>Hs-��&�

�4��K�<�L�4�)rr>c�,�eZdZdZd�Zd�Zd�ZeZd�Zy)�_FactoryIterableViewa:Wrap an iterator factory returned by `find_matches()`.

    Calling `iter()` on this class would invoke the underlying iterator
    factory, making it a "collection with ordering" that can be iterated
    through multiple times, but lacks random access methods presented in
    built-in Python sequence types.
    c� �||_d|_yr)�_factory�	_iterable)r�factorys  rrz_FactoryIterableView.__init__vs����
���rc�^�djt|�jt|��S�Nz{}({}))rG�typer8�listr
s rrHz_FactoryIterableView.__repr__zs!�����t�D�z�2�2�D��J�?�?rc�L�	tt|��y#t$rYywxYw)NFT)�nextr�
StopIterationr
s rrKz_FactoryIterableView.__bool__}s,��	���d������	��	�s��	#�#c��|j�|j�n|j}tj|�\|_}|Sr)rcrbrN�tee)r�iterable�currents   rrz_FactoryIterableView.__iter__�s;��#�~�~�5�D�M�M�O�4�>�>�	�#,�-�-��"9������rN�	r8r9r:r;rrHrKr^rr<rrr`r`ms#����@���K�rr`c�,�eZdZdZd�Zd�Zd�ZeZd�Zy)�_SequenceIterableViewz�Wrap an iterable returned by find_matches().

    This is essentially just a proxy to the underlying sequence that provides
    the same interface as `_FactoryIterableView`.
    c��||_yr)�	_sequence)r�sequences  rrz_SequenceIterableView.__init__�s	��!��rc�`�djt|�j|j�Srf)rGrgr8rtr
s rrHz_SequenceIterableView.__repr__�s!�����t�D�z�2�2�D�N�N�C�Crc�,�t|j�Sr)rJrtr
s rrKz_SequenceIterableView.__bool__�rrc�,�t|j�Sr)rrtr
s rrz_SequenceIterableView.__iter__�rrNrpr<rrrrrr�s#���"�D�$��K�$rrrc��t|�rt|�St|tj�st|�}t
|�S)zCBuild an iterable view from the value returned by `find_matches()`.)�callabler`�
isinstancer�Sequencerhrr)�matchess r�build_iter_viewr~�s9�����#�G�,�,��g��7�7�8��w�-�� ��)�)r)
rN�compatr�objectr�Mappingr>r`rrr~r<rr�<module>r�sI���#�?*�F�?*�D")�o�-�-�")�J�6��B$�F�$�,*r

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists