All rights reserved.
Planarity includes the Edge Addition Planarity Suite, which is
Copyright (c) 1997-2026, John M. Boyer.
The BSD-3-Clause license for the Edge Additional Planarity Suite
included in Planarity appears here:
https://github.com/graph-algorithms/planarity/blob/master/planarity/src/LICENSE.TXT
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
* Neither the names of the Planarity Developers nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
graph-algorithms-planarity-08d7b51/MANIFEST.in 0000664 0000000 0000000 00000001425 15220571440 0021057 0 ustar 00root root 0000000 0000000 include MANIFEST.in
include setup.py
include LICENSE.txt
include planarity/c/LICENSE.TXT
include README.md
include planarity/c/README
recursive-include planarity/c/ *.h
include planarity/classic/cplanarity.pxd
include planarity/classic/planarity.c
include planarity/classic/planarity.pyx
include planarity/full/cgraphLib.pxd
include planarity/full/graphLib.pxd
include planarity/full/graph.pxd
include planarity/full/graphLib.c
include planarity/full/graph.c
include planarity/full/g6IterationUtils.c
include planarity/full/graphLib.pyx
include planarity/full/graph.pyx
include planarity/full/g6IterationUtils.pyx
recursive-include examples *.py *.gz
recursive-include doc *.py *.rst Makefile *.html *.txt
global-exclude *~
global-exclude *.pyc
global-exclude .git
prune doc/build
graph-algorithms-planarity-08d7b51/README.md 0000664 0000000 0000000 00000005647 15220571440 0020612 0 ustar 00root root 0000000 0000000 # Planarity
The [`planarity` repository](https://github.com/graph-algorithms/planarity) provides the source code for the [`planarity` Python package](https://pypi.org/project/planarity/). The `planarity` package was originally developed to provide Python and [NetworkX](https://pypi.org/project/networkx/) developers with a Python API to access planar graph testing, embedding, drawing, and forbidden subgraph isolation algorithms from the [Edge Addition Planarity Suite (EAPS)](https://github.com/graph-algorithms/edge-addition-planarity-suite).
The `planarity` repository has now been transferred to the [Github Graph Algorithms Organization](https://github.com/graph-algorithms). The `planarity` repository and Python package have been updated with the full set of planarity-related algorithms from [EAPS](https://github.com/graph-algorithms/edge-addition-planarity-suite) as well as all public methods from its generalized graph library to enable development of a wide range of high-performance graph algorithms and applications.
## Example
```python
In [1]: # Example of the complete graph of 5 nodes, K5
In [2]: # K5 is not planar
In [3]: import planarity
In [4]: edgelist = [('a', 'b'), ('a', 'c'), ('a', 'd'), ('a', 'e'),
...: ('b', 'c'),('b', 'd'),('b', 'e'),
...: ('c', 'd'), ('c', 'e'),
...: ('d', 'e')]
In [5]: print(planarity.is_planar(edgelist))
False
In [6]: # remove an edge to make the graph planar
In [7]: edgelist.remove(('a','b'))
In [8]: print(planarity.is_planar(edgelist))
True
In [9]: # make an ascii text drawing
In [10]: print(planarity.ascii(edgelist))
```
----1----
| | | |
| | -3--|
| | ||||
| -2--|||
| | |||
---4---||
| ||
---5----
```python
In [11]: # Shows correspondence between vertex labels and indices
In [12]: print(planarity.mapping(edgelist))
{1: 'd', 2: 'c', 3: 'e', 4: 'a', 5: 'b'}
```
See [here](https://github.com/graph-algorithms/planarity/tree/master/examples) for more examples.
For further details on development setup and installation, please see [this](https://github.com/graph-algorithms/planarity/wiki/1.-Setup-Instructions) wiki page on the [`planarity` repository](https://github.com/graph-algorithms/planarity).
## License
Planarity (the 'planarity' Python package; the software) is released
under [this BSD-3-Clause license](https://github.com/graph-algorithms/planarity/blob/master/LICENSE.txt).
Copyright (c) 2016-2026, Planarity Developers
John M. Boyer
Wanda B. K. Boyer
Aric Hagberg
All rights reserved.
Planarity includes the Edge Addition Planarity Suite, which is
Copyright (c) 1997-2026, John M. Boyer.
The BSD-3-Clause license for the Edge Additional Planarity Suite
included in Planarity appears [here](https://github.com/graph-algorithms/planarity/blob/master/planarity/c/LICENSE.TXT).
graph-algorithms-planarity-08d7b51/doc/ 0000775 0000000 0000000 00000000000 15220571440 0020064 5 ustar 00root root 0000000 0000000 graph-algorithms-planarity-08d7b51/doc/Makefile 0000664 0000000 0000000 00000012716 15220571440 0021533 0 ustar 00root root 0000000 0000000 # Makefile for Sphinx documentation
#
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = build
# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
# the i18n builder cannot share the environment and doctrees with the others
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
help:
@echo "Please use \`make ' where is one of"
@echo " html to make standalone HTML files"
@echo " dirhtml to make HTML files named index.html in directories"
@echo " singlehtml to make a single large HTML file"
@echo " pickle to make pickle files"
@echo " json to make JSON files"
@echo " htmlhelp to make HTML files and a HTML help project"
@echo " qthelp to make HTML files and a qthelp project"
@echo " devhelp to make HTML files and a Devhelp project"
@echo " epub to make an epub"
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
@echo " latexpdf to make LaTeX files and run them through pdflatex"
@echo " text to make text files"
@echo " man to make manual pages"
@echo " texinfo to make Texinfo files"
@echo " info to make Texinfo files and run them through makeinfo"
@echo " gettext to make PO message catalogs"
@echo " changes to make an overview of all changed/added/deprecated items"
@echo " linkcheck to check all external links for integrity"
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
clean:
-rm -rf $(BUILDDIR)/*
html:
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
dirhtml:
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
singlehtml:
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
@echo
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
pickle:
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
@echo
@echo "Build finished; now you can process the pickle files."
json:
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
@echo
@echo "Build finished; now you can process the JSON files."
htmlhelp:
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
@echo
@echo "Build finished; now you can run HTML Help Workshop with the" \
".hhp project file in $(BUILDDIR)/htmlhelp."
qthelp:
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
@echo
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/planarity.qhcp"
@echo "To view the help file:"
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/planarity.qhc"
devhelp:
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
@echo
@echo "Build finished."
@echo "To view the help file:"
@echo "# mkdir -p $$HOME/.local/share/devhelp/planarity"
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/planarity"
@echo "# devhelp"
epub:
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
@echo
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
latex:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
@echo "Run \`make' in that directory to run these through (pdf)latex" \
"(use \`make latexpdf' here to do that automatically)."
latexpdf:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo "Running LaTeX files through pdflatex..."
make -C $(BUILDDIR)/latex all-pdf
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
text:
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
@echo
@echo "Build finished. The text files are in $(BUILDDIR)/text."
man:
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
@echo
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
texinfo:
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo
@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
@echo "Run \`make' in that directory to run these through makeinfo" \
"(use \`make info' here to do that automatically)."
info:
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo "Running Texinfo files through makeinfo..."
make -C $(BUILDDIR)/texinfo info
@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
gettext:
$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
@echo
@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
changes:
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
@echo
@echo "The overview file is in $(BUILDDIR)/changes."
linkcheck:
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
@echo
@echo "Link check complete; look for any errors in the above output " \
"or in $(BUILDDIR)/linkcheck/output.txt."
doctest:
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
@echo "Testing of doctests in the sources finished, look at the " \
"results in $(BUILDDIR)/doctest/output.txt."
graph-algorithms-planarity-08d7b51/doc/build/ 0000775 0000000 0000000 00000000000 15220571440 0021163 5 ustar 00root root 0000000 0000000 graph-algorithms-planarity-08d7b51/doc/build/doctrees/ 0000775 0000000 0000000 00000000000 15220571440 0022773 5 ustar 00root root 0000000 0000000 graph-algorithms-planarity-08d7b51/doc/build/doctrees/environment.pickle 0000664 0000000 0000000 00000040025 15220571440 0026531 0 ustar 00root root 0000000 0000000 €(csphinx.environment
BuildEnvironment
qoq}q(Udlfilesqcsphinx.util
FilenameUniqDict
q)�qc__builtin__
set
q]…RqbUintersphinx_named_inventoryq }Uappq
NU _warnfuncqNUtitlesq}q
(X indexqcdocutils.nodes
title
q)�q}q(U rawsourceqU U
attributesq}q(Udupnamesq]Uclassesq]Ubackrefsq]Uidsq]Unamesq]uUchildrenq]qcdocutils.nodes
Text
qX Planarityq…�q}q(hX Planarityq Uparentq!hubaUtagnameq"Utitleq#ubX reference/indexq$h)�q%}q&(hU h}q'(h]h]h]h]h]uh]q(hX Referenceq)…�q*}q+(hX Referenceq,h!h%ubah"h#ubuU
domaindataq-}q.(Ustdq/}q0(Uversionq1K U
anonlabelsq2}q3(Umodindexq4Upy-modindexU †Ugenindexq5h5U †Usearchq6UsearchU †uUlabelsq7}q8(h4Upy-modindexU csphinx.locale
_TranslationProxy
q9csphinx.locale
mygettext
q:UModule Indexq;†�q