Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
planarity_test_example.cc File Reference

Example usage of planarity test on Aleph graphs. More...

#include <algorithm>
#include <cstdlib>
#include <filesystem>
#include <fstream>
#include <iostream>
#include <string>
#include <Planarity_Test.H>
#include <tpl_graph.H>
Include dependency graph for planarity_test_example.cc:

Go to the source code of this file.

Functions

int main (int argc, char **argv)
 Example executable demonstrating Planarity_Test usage on Aleph graphs.
 

Detailed Description

Example usage of planarity test on Aleph graphs.

Build and run:

cmake -S . -B build cmake –build build –target planarity_test_example ./build/Examples/planarity_test_example

Definition in file planarity_test_example.cc.

Function Documentation

◆ main()

int main ( int  argc,
char **  argv 
)

Example executable demonstrating Planarity_Test usage on Aleph graphs.

This program selects an output directory (argv[1], then PLANARITY_OUT_DIR, then /tmp), configures planarity test options (embedding and non‑planar certificate computation, plus a strict LR variant), and runs several demonstration cases:

  • a planar sample (pentagon + chord) with optional dual and geometric drawing output,
  • a dense planar sample (K5 minus one edge) with dual metadata and optional drawing,
  • a non‑planar sample (K3,3) that emits JSON/DOT/GraphML/GEXF certificates, writes them to the output directory, and prints validator/render helper commands and diagnostics,
  • a directed‑graph normalization sample showing loop/parallel/opposite‑arc handling.

The program prints concise summaries and certificate/report paths to stdout.

Returns
int Exit status: 0 on success, non‑zero on error.

Definition at line 301 of file planarity_test_example.cc.

References Aleph::and, Aleph::Planarity_Test_Options::compute_embedding, Aleph::divide_and_conquer_partition_dp(), Aleph::Planarity_Test_Options::embedding_allow_bruteforce_fallback, Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_arc(), Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_node(), Aleph::nonplanar_certificate_to_dot(), Aleph::nonplanar_certificate_to_gexf(), Aleph::nonplanar_certificate_to_graphml(), Aleph::nonplanar_certificate_to_json(), Aleph::planar_dual_metadata(), Aleph::planar_geometric_drawing(), Aleph::planarity_test(), print_result(), r, Aleph::validate_nonplanar_certificate(), and vr.