관리-도구
편집 파일: structs.cpython-311.pyc
� �܋fc � � � d dl Z ddlmZ G d� de� � Z G d� dej � � Z G d� d e� � Z G d � de� � Zd� Z dS ) � N� )�collections_abcc �Z � e Zd ZdZd� Zd� Zd� Zd� Zd� Zd� Z d� Z d � Zd � Zd� Z d� Zd � ZdS )� DirectedGraphz&A graph structure with directed edges.c �H � t � � | _ i | _ i | _ d S �N)�set� _vertices� _forwards� _backwards��selfs �U/opt/cloudlinux/venv/lib64/python3.11/site-packages/pip/_vendor/resolvelib/structs.py�__init__zDirectedGraph.__init__ s � �������������� c �* � t | j � � S r )�iterr r s r �__iter__zDirectedGraph.__iter__ � � ��D�N�#�#�#r c �* � t | j � � S r )�lenr r s r �__len__zDirectedGraph.__len__ s � ��4�>�"�"�"r c � � || j v S r )r �r �keys r �__contains__zDirectedGraph.__contains__ s � ��d�n�$�$r c �� � t � � }t | j � � |_ d� | j � � � D � � |_ d� | j � � � D � � |_ |S )z$Return a shallow copy of this graph.c �4 � i | ]\ }}|t |� � ��S � �r ��.0�k�vs r � <dictcomp>z&DirectedGraph.copy.<locals>.<dictcomp> s$ � �H�H�H���A�1�c�!�f�f�H�H�Hr c �4 � i | ]\ }}|t |� � ��S r r r! s r r% z&DirectedGraph.copy.<locals>.<dictcomp> s$ � �J�J�J�$�!�Q�A�s�1�v�v�J�J�Jr )r r r r �itemsr )r �others r �copyzDirectedGraph.copy sh � ������d�n�-�-���H�H���1E�1E�1G�1G�H�H�H���J�J�$�/�2G�2G�2I�2I�J�J�J����r c �� � || j v rt d� � �| j � |� � t � � | j |<