next up previous contents index
Next: Two Layer Crossing Minimization Up: Rank Assignment Previous: Ranking with Predefined Width   Contents   Index


Ranking by Depth First Search ( DfsRanking )

Baseclasses


\begin{picture}(8,4)
\thicklines
\put(0,3){\framebox (5.5,1){\bf AGDModule}}...
...){\vector(0,-1){1}}\put(3,0){\framebox (5.5,1){\bf DfsRanking}}
\end{picture}

Definition

The DfsRanking module computes the following ranking of a graph G: We build a DFS forest T of the underlying undirected graph of G and set

$rank(v) = \left\{\begin{array}{cl}
0 & \mbox{if }v\mbox{ is a root of }T\\
rank(pred(v))+1 & \mbox{otherwise}
\end{array}\right.$
where pred (v) is the predecessor of v in T. Notice, that DfsRanking only considers the underlying undirected graph and therefore does not take into account edge directions.

General Information

Algorithm
name DFS-Ranking
long name DFS-Ranking
author
Implementation
author C. Gutwenger
date February 1998
version 1.0

Pre- and Postcondition

precondition = directed }
postcondition(PRE) = $ \emptyset$

#include < AGD/DfsRanking.h >

Creation

DfsRanking R creates an instance R of type DfsRanking.

Operations

Standard Interface (Inherited Methods) The detailed description of these methods can be found in the manual entries of the base class (RankAssignment).

bool R.check(const leda_graph& G, AgdKey& p)

void R.call(const leda_graph& G, leda_node_array<int>& rank)

Implementation

The computation of the ranking takes time $ \protectO$(| V| + | E|).


next up previous contents index
Next: Two Layer Crossing Minimization Up: Rank Assignment Previous: Ranking with Predefined Width   Contents   Index

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