Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/pygraph/functions/__pycache__/biconnected_components.cpython-39.pyc
Ðазад
a ^�h�* � @ s` d Z ddlmZmZ ddlmZ ddlmZ dd� Zd d � Z dd� Z d d� Zdd� Zdd� Z dS )z8Implements functionality to find biconnected components.� )�deque�defaultdict� )�%get_connected_components_as_subgraphs� )�get_subgraph_from_edge_listc C s, g }t | �}|D ]}t|�}|�|� q|S )z�Finds all the biconnected components in a graph. Returns a list of lists, each containing the edges that form a biconnected component. Returns an empty list for an empty graph. )r �/_internal_get_biconnected_components_edge_lists�extend)�graph�list_of_components� components� component� edge_list� r ��/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/pygraph/functions/biconnected_components.py�find_biconnected_components s r c C s. g }t | �}|D ]}t| |�}|�|� q|S )z?Finds the biconnected components and returns them as subgraphs.)r r �append)r Zlist_of_graphsr r Zsubgraphr r r �(find_biconnected_components_as_subgraphs s r c C sD g }| � � }t|�dkr|S t| �}|D ]}t|�}|�|� q(|S )z�Finds all of the articulation vertices within a graph. Returns a list of all articulation vertices within the graph. Returns an empty list for an empty graph. r )�get_all_node_ids�lenr �_internal_get_cut_vertex_listr )r Zarticulation_verticesZ all_nodesr r Zvertex_listr r r �find_articulation_vertices( s r c C sH g }| � � }| �� }|dkr6|dkr2|�| �� � |S d}t� }t� }tdd� �}tdd� �}i } i } tdd� �}tdd� �}t| �� �} t| �dk�rD| � � }|||<