planarity(1)

πŸ“¦
version 5.1.0.0 Β· 3 versions
, in alpine 3.24, arch rolling, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, ubuntu stonking

πŸ’– 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
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 the COMMAND (peep the section below) on one specific graph given in the INPUT file, with output landing in the primary OUTPUT file and complementary info, if there is any, going into the secondary COMPLEMENT file (think: an ASCII art rendition for the planar graph drawing command, iconic honestly). the return value is 0 if that specific graph is embeddable (like, it's planar, or it doesn't contain a homeomorphic subgraph) and 1 if it isn't embeddable (like, it's non planar, or it does contain a homeomorphic subgraph) πŸ’€
  • -r [-q] COMMAND K N [OUTPUT] β€” runs the COMMAND (yes, the one below) on K random graphs with N vertices. optionally, write all the generated graphs to a .g6 OUTPUT 🌸
  • -rm [-q] N OUTPUT [COMPLEMENT] β€” generates a random maximal planar graph with N vertices, then outputs its planar embedding into the primary OUTPUT file and optionally the generated graph into the COMPLEMENT file ✨
  • -rn [-q] N OUTPUT [COMPLEMENT] β€” generates a random nonplanar graph (maximal planar plus one edge, so messy of it) with N vertices, then outputs a Kuratowski subgraph of the generated graph into the primary OUTPUT file and optionally the generated graph into the COMPLEMENT file πŸ¦‹
  • [-q] -(gam) INPUT OUTPUT β€” transforms a single graph in the INPUT file (any supported format) into .g6 (g), adjacency list (a), or adjacency matrix (m) format, and outputs to the OUTPUT file πŸ’«
  • [-q] COMMAND INPUT OUTPUT β€” runs the COMMAND (scroll down, bestie) on graphs in the .g6 encoded INPUT file, then outputs summary statistics to the OUTPUT file πŸ“Š

πŸ”₯ 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 to K_{2,3} ✨
  • -3 β€” search for a subgraph homeomorphic to K_{3,3} πŸ’œ
  • -4 β€” search for a subgraph homeomorphic to K_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 πŸ¦‹


and that's the whole thing, bestie 🫢 this was planarity(1) from the General Commands Manual, signing off with so much love, mwah πŸ’–βœ¨πŸŽ€