<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet"
        integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css"
        integrity="sha512-SzlrxWUlpfuzQ+pcUCosxcglQRNAq/DZjVsC0lE40xsADsfeQoEypE+enwcOiGjk/bSuGGKHEyjSoQ1zVisanQ=="
        crossorigin="anonymous" referrerpolicy="no-referrer" />
</head>
</html>

Reเ  ใ               @   s   Gd  d   d e   Z d S)c               @   sฆ   e  Z d  Z d Z d d   Z d d   Z d d   Z d d	   Z d
 d   Z d d   Z	 d d   Z
 d d   Z d d   Z d d   Z d d   Z d d   Z d S)ฺDirectedGraphz+A graph structure with directed edges.
    c             C   s"   t    |  _ i  |  _ i  |  _ d  S)N)ฺsetฺ	_verticesฺ	_forwardsฺ
_backwards)ฺselfฉ r   ๚/builddir/build/BUILDROOT/alt-python35-pip-20.2.4-5.el8.x86_64/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/resolvelib/structs.pyฺ__init__   s    	zDirectedGraph.__init__c             C   s   t  |  j  S)N)ฺiterr   )r   r   r   r   ฺ__iter__
   s    zDirectedGraph.__iter__c             C   s   t  |  j  S)N)ฺlenr   )r   r   r   r   ฺ__len__   s    zDirectedGraph.__len__c             C   s   | |  j  k S)N)r   )r   ฺkeyr   r   r   ฺ__contains__   s    zDirectedGraph.__contains__c             C   s]   t    } t |  j  | _ d d   |  j j   D | _ d d   |  j j   D | _ | S)z-Return a shallow copy of this graph.
        c             S   s%   i  |  ] \ } } t  |  |  q Sr   )r   )ฺ.0ฺkฺvr   r   r   ๚
<dictcomp>   s   	 z&DirectedGraph.copy.<locals>.<dictcomp>c             S   s%   i  |  ] \ } } t  |  |  q Sr   )r   )r   r   r   r   r   r   r      s   	 )r   r   r   r   ฺitemsr   )r   ฺotherr   r   r   ฺcopy   s
    	zDirectedGraph.copyc             C   sO   | |  j  k r t d   |  j  j |  t   |  j | <t   |  j | <d S)z'Add a new vertex to the graph.
        zvertex existsN)r   ฺ
ValueErrorฺaddr   r   r   )r   r   r   r   r   r      s
    zDirectedGraph.addc             C   sv   |  j  j |  x. |  j j |  D] } |  j | j |  q# Wx. |  j j |  D] } |  j | j |  qT Wd S)zLRemove a vertex from the graph, disconnecting all edges from/to it.
        N)r   ฺremover   ฺpopr   )r   r   ฺfฺtr   r   r   r   %   s
    zDirectedGraph.removec             C   s$   | |  j  | k o# | |  j | k S)N)r   r   )r   r   r   r   r   r   ฺ	connected.   s    zDirectedGraph.connectedc             C   sG   | |  j  k r t |   |  j | j |  |  j | j |  d S)zgConnect two existing vertices.

        Nothing happens if the vertices are already connected.
        N)r   ฺKeyErrorr   r   r   )r   r   r   r   r   r   ฺconnect1   s    zDirectedGraph.connectc             c   s@   x9 |  j  j   D]( \ } } x | D] } | | f Vq# Wq Wd  S)N)r   r   )r   r   ฺchildrenr   r   r   r   ฺ
iter_edges;   s    zDirectedGraph.iter_edgesc             C   s   t  |  j |  S)N)r
   r   )r   r   r   r   r   ฺiter_children@   s    zDirectedGraph.iter_childrenc             C   s   t  |  j |  S)N)r
   r   )r   r   r   r   r   ฺiter_parentsC   s    zDirectedGraph.iter_parentsN)ฺ__name__ฺ
__module__ฺ__qualname__ฺ__doc__r	   r   r   r   r   r   r   r   r   r!   r"   r#   r   r   r   r   r      s   			
r   N)ฺobjectr   r   r   r   r   ฺ<module>   s    