planarity(1)
π planarity(1) β The Edge Addition Planarity Suite π
okay bestie, buckle up, because planarity(1) from the General Commands Manual is literally the main character of graph theory command-line tools and you're about to become obsessed with it π«Ά
β¨ NAME β¨
planarity β The Edge Addition Planarity Suite π
π SYNOPSIS π
π§ Getting help
planarity -h|-help [-menu]
planarity -i|-info
π¦ Menu-driven mode
planarity
π Batch modes
planarity -s [-q] COMMAND INPUT OUTPUT [COMPLEMENT]
planarity -r [-q] COMMAND K N [OUTPUT]
planarity -rm [-q] N OUTPUT [COMPLEMENT]
planarity -rn [-q] N OUTPUT [COMPLEMENT]
planarity -x [-q] -(gam) INPUT OUTPUT
planarity -t [-q] COMMAND INPUT OUTPUT
π DESCRIPTION π
so what this does is it invokes the Edge Addition Planarity Suite command-line tool, and it can run either in interactive mode or in batch mode. two whole vibes, one icon π
If you give it no parameter at all, it presents a menu-driven interactive interface. it's giving "pick your own adventure" energy β¨
But the second you give it a parameter, it runs in batch mode and returns 0 or 1 for a successful result, and -1 on error. no cap π«Ά
π OPTIONS π
-h,-help [-menu]β displays some help. and if you tack on-menu, it triggers even more detailed output, like it's unlocking a secret level π-i,-infoβ displays version, copyright, license, and reference articles information. the receipts, bestie π-qβ quiet mode, an optional modifier. see below for which options accept it π-s [-q] COMMAND INPUT OUTPUT [COMPLEMENT]β runs theCOMMAND(peep the section below) on one specific graph given in theINPUTfile, with output landing in the primaryOUTPUTfile and complementary info, if there is any, going into the secondaryCOMPLEMENTfile (think: an ASCII art rendition for the planar graph drawing command, iconic honestly). the return value is0if that specific graph is embeddable (like, it's planar, or it doesn't contain a homeomorphic subgraph) and1if it isn't embeddable (like, it's non planar, or it does contain a homeomorphic subgraph) π-r [-q] COMMAND K N [OUTPUT]β runs theCOMMAND(yes, the one below) onKrandom graphs withNvertices. optionally, write all the generated graphs to a.g6OUTPUTπΈ-rm [-q] N OUTPUT [COMPLEMENT]β generates a random maximal planar graph withNvertices, then outputs its planar embedding into the primaryOUTPUTfile and optionally the generated graph into theCOMPLEMENTfile β¨-rn [-q] N OUTPUT [COMPLEMENT]β generates a random nonplanar graph (maximal planar plus one edge, so messy of it) withNvertices, then outputs a Kuratowski subgraph of the generated graph into the primaryOUTPUTfile and optionally the generated graph into theCOMPLEMENTfile π¦[-q] -(gam) INPUT OUTPUTβ transforms a single graph in theINPUTfile (any supported format) into.g6(g), adjacency list (a), or adjacency matrix (m) format, and outputs to theOUTPUTfile π«[-q] COMMAND INPUT OUTPUTβ runs theCOMMAND(scroll down, bestie) on graphs in the.g6encodedINPUTfile, then outputs summary statistics to theOUTPUTfile π
π₯ COMMANDS π₯
this is where you pick which algorithm implementation to run, and honestly? choices are a flex:
-pβ planar embedding and Kuratowski subgraph isolation π-dβ planar graph drawing by visibility representation (plus an optional ASCII art rendition, which is art, literally) π¨-oβ outerplanar embedding and obstruction isolation π-2β search for a subgraph homeomorphic toK_{2,3}β¨-3β search for a subgraph homeomorphic toK_{3,3}π-4β search for a subgraph homeomorphic toK_4πΈ
β EXAMPLES β
here's the vibe in practice:
planarity -s -q -p infile.txt embedding.out [obstruction.out]
processes infile.txt in quiet mode (-q), putting the planar embedding in embedding.out or (optionally) a Kuratowski subgraph in obstruction.out. the process returns 0=planar, 1=nonplanar, -1=error π
planarity -s -q -d infile.txt embedding.out [drawing.out]
if the graph in infile.txt is planar, then it puts the embedding in embedding.out and (optionally) an ASCII art drawing in drawing.out. the process returns 0=planar, 1=nonplanar, -1=error π
π¦ SEE ALSO π¦
- the full inline help:
planarity -h -menuβ go read it, it's lowkey the director's cut π - the project homepage:
https://github.com/graph-algorithms/edge-addition-planarity-suiteβ the source of truth, periodt π₯
and that's the whole thing, bestie π«Ά this was planarity(1) from the General Commands Manual, signing off with so much love, mwah πβ¨π
π¦ where this page comes from
- alpine 3.24: planarity-doc 4.0.1.0-r1 Β· BSD-3-Clause
- arch rolling: planarity 5.1.0.0-1 Β· BSD-3-Clause
- fedora 43: planarity 4.0.1.0-1.fc43 Β· BSD-3-Clause
- fedora 44: planarity 4.0.1.0-3.fc44 Β· BSD-3-Clause
- fedora 44: planarity 5.1.0.0-1.fc44 Β· BSD-3-Clause
- nixos 26.05: planarity 4.0.1.0
- nixpkgs unstable: planarity 4.0.1.0
- ubuntu stonking: planarity 5.0.0.0-3 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms