JFIF$        dd7 

Viewing File: /usr/lib/python3.9/site-packages/pip/_vendor/resolvelib/__pycache__/structs.cpython-39.pyc

a

[��f��@sbddlZddlmZGdd�de�ZGdd�dej�ZGdd	�d	e�ZGd
d�de�Zdd
�Z	dS)�N�)�collections_abcc@speZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�ZdS)�
DirectedGraphz&A graph structure with directed edges.cCst�|_i|_i|_dS�N)�set�	_vertices�	_forwards�
_backwards��self�r�B/usr/lib/python3.9/site-packages/pip/_vendor/resolvelib/structs.py�__init__	szDirectedGraph.__init__cCs
t|j�Sr)�iterrr
rrr
�__iter__szDirectedGraph.__iter__cCs
t|j�Sr)�lenrr
rrr
�__len__szDirectedGraph.__len__cCs
||jvSr)r�r�keyrrr
�__contains__szDirectedGraph.__contains__cCsBt�}t|j�|_dd�|j��D�|_dd�|j��D�|_|S)z$Return a shallow copy of this graph.cSsi|]\}}|t|��qSr�r��.0�k�vrrr
�
<dictcomp>�z&DirectedGraph.copy.<locals>.<dictcomp>cSsi|]\}}|t|��qSrrrrrr
rr)rrrr�itemsr	)r�otherrrr
�copys
zDirectedGraph.copycCs:||jvrtd��|j�|�t�|j|<t�|j|<dS)zAdd a new vertex to the graph.z
vertex existsN)r�
ValueError�addrrr	rrrr
r!s

zDirectedGraph.addcCsT|j�|�|j�|�D]}|j|�|�q|j�|�D]}|j|�|�q:dS)zCRemove a vertex from the graph, disconnecting all edges from/to it.N)r�remover�popr	)rr�f�trrr
r"'s
zDirectedGraph.removecCs||j|vo||j|vSr)r	r�rr$r%rrr
�	connected/szDirectedGraph.connectedcCs6||jvrt|��|j|�|�|j|�|�dS)zgConnect two existing vertices.

        Nothing happens if the vertices are already connected.
        N)r�KeyErrorrr!r	r&rrr
�connect2s
zDirectedGraph.connectccs,|j��D]\}}|D]}||fVqq
dSr)rr)rr$Zchildrenr%rrr
�
iter_edges<szDirectedGraph.iter_edgescCst|j|�Sr)rrrrrr
�
iter_childrenAszDirectedGraph.iter_childrencCst|j|�Sr)rr	rrrr
�iter_parentsDszDirectedGraph.iter_parentsN)�__name__�
__module__�__qualname__�__doc__rrrrrr!r"r'r)r*r+r,rrrr
rs
rc@sJeZdZddd�Zdd�Zdd�ZeZdd	�Zd
d�Zdd
�Z	dd�Z
dS)�IteratorMappingNcCs||_||_|pi|_dSr)�_mapping�	_accessor�_appends)r�mapping�accessorZappendsrrr
rIszIteratorMapping.__init__cCsd�|j|j|j�S)Nz!IteratorMapping({!r}, {!r}, {!r}))�formatr2r3r4r
rrr
�__repr__Ns
�zIteratorMapping.__repr__cCst|jp|j�Sr)�boolr2r4r
rrr
�__bool__UszIteratorMapping.__bool__cCs||jvp||jvSr)r2r4rrrr
rZszIteratorMapping.__contains__cCsLz|j|}Wn ty.t|j|�YS0t�|�|�|j�|d��S)Nr)r2r(rr4�	itertools�chainr3�get)rrrrrr
�__getitem__]s
zIteratorMapping.__getitem__cs"�fdd��jD�}t��j|�S)Nc3s|]}|�jvr|VqdSr�r2�rrr
rr
�	<genexpr>erz+IteratorMapping.__iter__.<locals>.<genexpr>)r4r;r<r2�rZmorerr
r
rdszIteratorMapping.__iter__cs&t�fdd��jD��}t�j�|S)Nc3s|]}|�jvrdVqdS)rNr?r@r
rr
rAirz*IteratorMapping.__len__.<locals>.<genexpr>)�sumr4rr2rBrr
r
rhszIteratorMapping.__len__)N)r-r.r/rr8r:�__nonzero__rr>rrrrrr
r1Hs
r1c@s4eZdZdZdd�Zdd�Zdd�ZeZdd	�Zd
S)�_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.
    cCs
||_dSr��_factory)r�factoryrrr
rvsz_FactoryIterableView.__init__cCsd�t|�jt|����S�Nz{}({}))r7�typer-�listrGr
rrr
r8ysz_FactoryIterableView.__repr__cCs*zt|���Wnty$YdS0dS)NFT)�nextrG�
StopIterationr
rrr
r:|s
z_FactoryIterableView.__bool__cCs|��SrrFr
rrr
r�sz_FactoryIterableView.__iter__N�	r-r.r/r0rr8r:rDrrrrr
rEmsrEc@s4eZdZdZdd�Zdd�Zdd�ZeZdd	�Zd
S)�_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`.
    cCs
||_dSr)�	_sequence)rZsequencerrr
r�sz_SequenceIterableView.__init__cCsd�t|�j|j�SrI)r7rJr-rPr
rrr
r8�sz_SequenceIterableView.__repr__cCs
t|j�Sr)r9rPr
rrr
r:�sz_SequenceIterableView.__bool__cCs
t|j�Sr)rrPr
rrr
r�sz_SequenceIterableView.__iter__NrNrrrr
rO�srOcCs,t|�rt|�St|tj�s$t|�}t|�S)zCBuild an iterable view from the value returned by `find_matches()`.)�callablerE�
isinstancer�SequencerKrO)�matchesrrr
�build_iter_view�s
rU)
r;�compatr�objectr�Mappingr1rErOrUrrrr
�<module>sB%
Back to Directory  nL+D550H?Mx ,D"v]qv;6*Zqn)ZP0!1 A "#a$2Qr D8 a Ri[f\mIykIw0cuFcRı?lO7к_f˓[C$殷WF<_W ԣsKcëIzyQy/_LKℂ;C",pFA:/]=H  ~,ls/9ć:[=/#f;)x{ٛEQ )~ =𘙲r*2~ a _V=' kumFD}KYYC)({ *g&f`툪ry`=^cJ.I](*`wq1dđ#̩͑0;H]u搂@:~וKL Nsh}OIR*8:2 !lDJVo(3=M(zȰ+i*NAr6KnSl)!JJӁ* %݉?|D}d5:eP0R;{$X'xF@.ÊB {,WJuQɲRI;9QE琯62fT.DUJ;*cP A\ILNj!J۱+O\͔]ޒS߼Jȧc%ANolՎprULZԛerE2=XDXgVQeӓk yP7U*omQIs,K`)6\G3t?pgjrmۛجwluGtfh9uyP0D;Uڽ"OXlif$)&|ML0Zrm1[HXPlPR0'G=i2N+0e2]]9VTPO׮7h(F*癈'=QVZDF,d߬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