Baseclasses
Definition
The purpose of class TopologyModule is to relate the geometrical and topological structure of a graph. An instance of type TopologyModule transports the information from the actual drawing in the combinatorial structure of the underlying graph G. The output is a planar representation for G, i.e., a combinatorial embedding defining the faces and an external face f0.
Input and Output Parameters
input parameter: | graph |
in![]() |
layout |
in![]() |
|
output parameter: | planar representation |
out![]() ![]() |
The integer constants in_graph, in_layout, and out_plan_rep 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.
#include < AGD/TopologyModule.h >
Initialization
TopologyModule | T | initializes a topology module. |
Operations
Standard Interface
bool | T.check(const leda_graph& G, AgdKey& p) | |
returns true if G satisfies the precondition of T. Otherwise, false is returned and p contains a property that is not satisfied. | ||
PlaneGraphCopy& | T.call(const leda_graph& G, const LayoutInterface& L, leda_face& f_0, bool preserveMap = true) | |
calls the topology module for graph G and layout interface L. The method returns a copy of G in which the edges are ordered according to the angles in the drawing and thus characterize a combinatorial embedding. If the imposed combinatorial embedding is proper, the parameter f0 contains the external face, otherwise nil. The parameter preserveMap is passed to the constructor of PlaneGraphCopy. | ||
PlaneGraphCopy& | T.call(const leda_graph& G, const LayoutInterface& L, bool preserveMap = true) | |
calls the topology module by only determining the combinatorial embedding. It does not compute the face cycles and does not determine the external face. The parameter preserveMap is passed to the constructor of PlaneGraphCopy. |
Example An example program showing how to use a TopologyModule in combination with a planar layout algorithm can be found in Section The Orthogonal Drawing Algorithm (p. Pure Orthogonal Layout).
© Copyright 1998-2001, Algorithmic Solutions Software GmbH. All rights reserved.
2001-08-13