Baseclasses
Definition
The class PlanarizerModule is the base class for planarization modules. A planarization module transforms a graph G into a planar graph PG by replacing edge crossings with dummy nodes, and computes a combinatorial embedding of PG.
Input and Output Parameters
input parameter: | graph | in_graph=1 |
output parameter: | planarized graph | out_planarized_graph=1 |
The integer constants in_graph and out_planarized_layout denote the positions in the input and output parameter lists. The values can be used to reference the desired parameter when setting the pre- and postcondition.
Implementation of Planarization Algorithms
An implementation of a planarization module must override the protected
method do_call(G,PG),
which gets as input a graph G = (V, E) and produces as output a planar
graph
PG = (V Vd, E'). It replaces a set of edges
Er
E
by chains of edges leading over dummy nodes
Vd.
Each dummy node is a node of degree 4, and the output graph PG
represents a planar map.
In particular, an edge
e = (v, w) Er is replaced with a chain
e1 = (v1, v2),..., ek = (vk, vk + 1), where v1 = v, vk + 1 = w, and
vi
Vd for all 2 < = i < = k. The corresponding chain of edges
is stored in PG, i.e.,
PG.chain(original(e)) = e1,..., ek.
Furthermore, tho following must hold:
Then, there must be a mapping
: Ed
Er with
(e) = chain(e) for all e
Er.
#include < AGD/PlanarizerModule.h >
Initialization
PlanarizerModule | P | initializes a planarization module. |
Operations
Standard Interface
bool | P.check(const GraphCopy& G, AgdKey& p) | |
returns true if G satisfies the precondition of P. Otherwise, false is returned and p contains a property that is not satisfied. | ||
void | P.call(const leda_graph& G, PlaneGraphCopy& PG) | |
calls the planarization module for graph PG. Stores
the planarization in PG, i.e., for every edge e ![]() |
Protected Overridables to Implement Functionality
void | P.do_call(const leda_graph& G, PlaneGraphCopy& PG) | |
implements the planarization algorithm for graph G. Stores
the planarization in PG, i.e., for every edge e ![]() |
© Copyright 1998-2001, Algorithmic Solutions Software GmbH. All rights reserved.
2001-08-13