|
Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
|
Planarity testing on Aleph graphs. More...
#include <ah-graph-concepts.H>#include <algorithm>#include <cmath>#include <cstddef>#include <limits>#include <sstream>#include <string>#include <utility>#include <ah-errors.H>#include <tpl_array.H>#include <tpl_dfs_stack.H>#include <tpl_dynMapTree.H>#include <tpl_dynSetTree.H>#include <tpl_graph.H>#include <tpl_sort_utils.H>#include <ah-iterator.H>Go to the source code of this file.
Namespaces | |
| namespace | Aleph |
| Main namespace for Aleph-w library functions. | |
| namespace | Aleph::planarity_detail |
Typedefs | |
| template<class GT > | |
| using | Aleph::Default_Planar_Dual_Graph = List_Graph< Graph_Node< size_t >, Graph_Arc< Planar_Dual_Edge_Info< GT > > > |
Enumerations | |
| enum class | Aleph::Planarity_Certificate_Type { Aleph::Planarity_Certificate_Type::None , Aleph::Planarity_Certificate_Type::K5_Subdivision , Aleph::Planarity_Certificate_Type::K33_Subdivision , Aleph::Planarity_Certificate_Type::Minimal_NonPlanar_Obstruction } |
| Non-planarity witness classification. More... | |
Functions | |
| const char * | Aleph::to_string (const Planarity_Certificate_Type type) noexcept |
| Return readable name for certificate type. | |
| bool | Aleph::planarity_detail::interval_empty (const Interval &i) noexcept |
| bool | Aleph::planarity_detail::pair_empty (const Conflict_Pair &p) noexcept |
| std::string | Aleph::planarity_detail::json_escape_string (const std::string &s) |
| std::string | Aleph::planarity_detail::dot_escape_string (const std::string &s) |
| std::string | Aleph::planarity_detail::xml_escape_string (const std::string &s) |
| template<class PtrT > | |
| std::string | Aleph::planarity_detail::pointer_to_string (const PtrT ptr) |
| template<AlephGraph GT> | |
| void | Aleph::planarity_detail::collect_certificate_nodes (const Planarity_Test_Result< GT > &result, Array< typename GT::Node * > &nodes, DynMapTree< typename GT::Node *, size_t > &node_to_id) |
| double | Aleph::planarity_detail::orient2d (const double ax, const double ay, const double bx, const double by, const double cx, const double cy) noexcept |
| bool | Aleph::planarity_detail::bounding_boxes_intersect (const double ax, const double ay, const double bx, const double by, const double cx, const double cy, const double dx, const double dy) noexcept |
| bool | Aleph::planarity_detail::segments_properly_intersect (const double ax, const double ay, const double bx, const double by, const double cx, const double cy, const double dx, const double dy) noexcept |
| template<AlephGraph GT, ArcFilter< GT > SA = Dft_Show_Arc<GT>> | |
| Planarity_Test_Result< GT > | Aleph::planarity_test (const GT &g, SA sa=SA(), const Planarity_Test_Options &options=Planarity_Test_Options()) |
| Execute a comprehensive planarity test on an Aleph graph. | |
| template<AlephGraph GT> | |
| Planarity_Test_Result< GT > | Aleph::planarity_test (const GT &g, const Planarity_Test_Options &options) |
| Overload with default arc selector. | |
| template<AlephGraph GT, ArcFilter< GT > SA = Dft_Show_Arc<GT>> | |
| bool | Aleph::is_planar_graph (const GT &g, SA sa=SA(), const Planarity_Test_Options &options=Planarity_Test_Options()) |
| High-level boolean check for graph planarity. | |
| template<AlephGraph GT> | |
| bool | Aleph::is_planar_graph (const GT &g, const Planarity_Test_Options &options) |
| Overload with default arc selector. | |
| template<AlephGraph GT> | |
| Planar_Dual_Metadata< GT > | Aleph::planar_dual_metadata (const Planarity_Test_Result< GT > &result) |
| Build face and dual-edge metadata from a planar embedding result. | |
| template<AlephGraph GT, class DGT = Default_Planar_Dual_Graph<GT>> | |
| DGT | Aleph::build_planar_dual_graph (const Planar_Dual_Metadata< GT > &md) |
| Build an Aleph dual graph from face/dual metadata. | |
| template<AlephGraph GT, class DGT = Default_Planar_Dual_Graph<GT>> | |
| DGT | Aleph::build_planar_dual_graph (const Planarity_Test_Result< GT > &result) |
| Build an Aleph dual graph directly from a planarity result. | |
| template<AlephGraph GT> | |
| Planar_Geometric_Drawing< GT > | Aleph::planar_geometric_drawing (const Planarity_Test_Result< GT > &result, const Planar_Geometric_Drawing_Options &options=Planar_Geometric_Drawing_Options()) |
| Build embedding-aware 2D node coordinates from a planar result. | |
| template<AlephGraph GT, class Node_Label = Dft_Certificate_Node_Label<GT>> | |
| std::string | Aleph::nonplanar_certificate_to_json (const Planarity_Test_Result< GT > &result, Node_Label node_label=Node_Label(), const NonPlanar_Certificate_Export_Options &options=NonPlanar_Certificate_Export_Options()) |
| Export non-planar certificate as JSON. | |
| template<AlephGraph GT, class Node_Label = Dft_Certificate_Node_Label<GT>> | |
| std::string | Aleph::nonplanar_certificate_to_dot (const Planarity_Test_Result< GT > &result, Node_Label node_label=Node_Label(), const NonPlanar_Certificate_Export_Options &options=NonPlanar_Certificate_Export_Options()) |
| Export non-planar certificate as GraphViz DOT. | |
| template<AlephGraph GT> | |
| NonPlanar_Certificate_Validation< GT > | Aleph::validate_nonplanar_certificate (const Planarity_Test_Result< GT > &result) |
| Validate structural consistency of a non-planar certificate. | |
| template<AlephGraph GT> | |
| bool | Aleph::nonplanar_certificate_is_valid (const Planarity_Test_Result< GT > &result) |
Convenience predicate over validate_nonplanar_certificate(). | |
| template<AlephGraph GT, class Node_Label = Dft_Certificate_Node_Label<GT>> | |
| std::string | Aleph::nonplanar_certificate_to_graphml (const Planarity_Test_Result< GT > &result, Node_Label node_label=Node_Label(), const NonPlanar_Certificate_Export_Options &options=NonPlanar_Certificate_Export_Options()) |
| Export non-planar certificate as GraphML. | |
| template<AlephGraph GT, class Node_Label = Dft_Certificate_Node_Label<GT>> | |
| std::string | Aleph::nonplanar_certificate_to_gexf (const Planarity_Test_Result< GT > &result, Node_Label node_label=Node_Label(), const NonPlanar_Certificate_Export_Options &options=NonPlanar_Certificate_Export_Options()) |
| Export non-planar certificate as GEXF. | |
Variables | |
| static constexpr size_t | Aleph::planarity_detail::Null_Edge = std::numeric_limits<size_t>::max() |
Planarity testing on Aleph graphs.
This header provides a dedicated API to test whether a graph is planar, with optional combinatorial embedding and optional non-planarity witness.
Decide if a graph can be drawn on the plane with no edge crossings.
The test is performed on the underlying undirected simple graph:
This normalization preserves planarity.
The core checker uses the Left-Right planarity test (de Fraysseix-Rosenstiehl / Brandes style), with:
Definition in file Planarity_Test.H.