next up previous contents index
Next: The Leftmost Canonical Order Up: Canonical Orderings Previous: Sets of a Canonical   Contents   Index


The Canonical Ordering of a Graph ( CanonicalOrder )

Definition

An instance C of type CanonicalOrder is canonical ordering of a plane graph G=(V,E). It represents an ordered partition V1,..., Vm of V. We provide a canonical ordering for triconnected planar graphs (Goos Kant), and another one for biconnected planar graphs:

Definition (canonical ordering for triconnected planar graphs): Let G = (V, E) be a triconnected plane graph with | V| > = 3, outerface Fout, and v1,..., vq a path on Fout with q < | Fout|. Let C = V1,..., Vm be an ordered partition of V, that is, V1 $ \cup$...$ \cup$ Vm = V and Vi $ \cap$ Vj = $ \emptyset$ for i! = j. Define Gk to be the subgraph of G induced by V1 $ \cup$...$ \cup$ Vk, and denote by Ck the outerface of Gk. C is a canonical ordering (for triconnected planar graphs) of G with base v1,..., vq if:

This is the definition of the canonical ordering for triconnected planar graphs by Goos Kant extended by the possibility to have more than two nodes in V1.

Definition (canonical ordering for biconnected planar graphs): Let G = (V, E) be a biconnected plane graph with | V| > = 2, outerface Fout and v1,..., vq a path on Fout with (vi, vj)$ \notin$E for all j! = i + 1. Let C = (V1,..., Vm) be an ordered partition of V, that is, V1 $ \cup$...$ \cup$ Vm = V and Vi $ \cap$ Vj = $ \emptyset$ for i! = j. Define Gk to be the subgraph of G induced by V1 $ \cup$ V2...$ \cup$ Vk, and denote by Ck the outerface of Gk. C is a canonical ordering (for biconnected planar graphs) of G with base v1,..., vq if:

The computation of the canonical ordering (call of the constructor) allows the following options:

#include < AGD/CanonicalOrder.h >

Creation

CanonicalOrder C(leda_graph& G, CanonicalOrderType co_type = co_triconnected, leda_face F = nil, bool prefer_nodes = false, double base_ratio = 0.0)
    creates an instance C of type CanonicalOrder initialized to a canonical ordering for triconnected, planar graphs (co_triconnected), or for biconnected, planar graphs (co_biconnected). Precondition: G is a directed graph representing a planar map.

Operations

int C.length() returns the number m of sets in the partition.

int C.len(int i) returns the length of the i-th set Vi.

leda_node C(int i, int j) returns the j-th node of the i-th set Vi.

const OrderSet& C[int i] returns a constant reference to the i-th set Vi.

leda_node C.left(int i) returns the leftvertex of the i-th set Vi.

leda_node C.right(int i) returns the rightvertex of the i-th set Vi.

int C.rank(leda_node v) returns the rank of node v, i.e. rank(v) = i$ \iff$v $ \in$ Vi.

Implementation

The computation of a canonical ordering takes time $ \protectO$(n), where n is the number of nodes of G.


next up previous contents index
Next: The Leftmost Canonical Order Up: Canonical Orderings Previous: Sets of a Canonical   Contents   Index

© Copyright 1998-2001, Algorithmic Solutions Software GmbH. All rights reserved.
2001-08-13