Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/pygraph/classes/__pycache__/directed_graph.cpython-39.pyc
Ðазад
a ^�h� � @ s0 d Z ddlZddlmZmZ G dd� de�ZdS )z1Implements the functionality of a directed graph.� N� )�NonexistentNodeError�NonexistentEdgeErrorc @ s� e Zd ZdZdZdZdZdd� Zd3dd�Zdd� Z d d � Z dd� Zd d� Zdd� Z d4dd�Zdd� Zdd� Zdd� Zdd� Zdd� Zdd� Zdd � Zd!d"� Zd#d$� Zd%d&� Zd'd(� Zd)d*� Zd+d,� Zd-d.� Zd/d0� Zd1d2� ZdS )5� DirectedGraphN� c C s i | _ i | _d| _d| _d S )Nr )�nodes�edges� _num_nodes� _num_edges��self� r ��/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/pygraph/classes/directed_graph.py�__init__ s zDirectedGraph.__init__c C sF t � }t�| j�|_t�| j�|_| j|_| j|_| j|_| j|_|S )N) r �copy�deepcopyr r �next_node_id�next_edge_idr r )r �memo�graphr r r �__deepcopy__ s zDirectedGraph.__deepcopy__c C s | j S )z1Returns the current number of nodes in the graph.)r r r r r � num_nodes s zDirectedGraph.num_nodesc C s | j S )z1Returns the current number of edges in the graph.)r r r r r � num_edges"