Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/pygraph/functions/planarity/__pycache__/kocay_algorithm.cpython-39.pyc
Ðазад
a ^�h� � @ s d Z ddlmZ ddlmZ dd� Zdd� Zd d � Zdd� Zd d� Z dd� Z dd� Zdd� Zdd� Z dd� Zd�dd�Zdd� Zdd� Zd d!� Zd"d#� Zd$d%� Zd&d'� Zd(d)� Zd*d+� Zd,d-� Zd.d/� Zd0d1� Zd2d3� Zd�d5d6�Zd7d8� Zd9d:� Zd;d<� Zd=d>� Z d?d@� Z!dAdB� Z"dCdD� Z#dEdF� Z$dGdH� Z%dIdJ� Z&dKdL� Z'dMdN� Z(dOdP� Z)dQdR� Z*dSdT� Z+dUdV� Z,dWdX� Z-dYdZ� Z.d[d\� Z/d]d^� Z0d_d`� Z1dadb� Z2dcdd� Z3dedf� Z4dgdh� Z5didj� Z6dkdl� Z7dmdn� Z8dodp� Z9dqdr� Z:dsdt� Z;dudv� Z<dwdx� Z=dydz� Z>d{d|� Z?d}d~� Z@dd�� ZAd4S )�z� Implementing planarity testing as per "The Hopcroft-Tarjan Planarity Algorithm" by William Kocay Location: http://www.combinatorialmath.ca/G&G/articles/planarity.pdf � )�deque� )�#depth_first_search_with_parent_datac C s8 t | �}t| |�}t|�}t| |�}t|� t|�}|S )z%Determines whether a graph is planar.)�__calculate_adjacency_lists�__setup_dfs_data�__sort_adjacency_lists�__branch_point_dfs�__embed_branch)�graph�adj�dfs_dataZ is_planar� r ��/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/pygraph/functions/planarity/kocay_algorithm.py�kocay_planarity_test s r c C sJ t | |�}| |d<