next up previous contents index
Next: Ranking to Minimize Edge Up: Rank Assignment Previous: RankAssignment Modules ( RankAssignment   Contents   Index


Ranking to Minimize Height ( LongestPathRanking )

Baseclasses


\begin{picture}(8,4)
\thicklines
\put(0,3){\framebox (5.5,1){\bf AGDModule}}...
...r(0,-1){1}}\put(2,0){\framebox (6.5,1){\bf LongestPathRanking}}
\end{picture}

Definition

The LongestPathRanking module computes the following ranking of a graph G = (V, E): First, a feedback set R $ \subset$ E is computed, that is, the graph G' resulting from G by reversing all the edges in R is acyclic. In this step, self-loops are simply ignored. For this purpose, we use a subgraph module that computes a maximal acyclic subgraph (that also implies a feedback set R). Then, we compute a ranking satisfying

Hence, the so-computed ranking of the acyclic graph G' uses the minimum number of layers, that is, the height of the layering is minimal if we constrain each edge in G' to run downward. Optionally, all nodes with degree 0 can be placed on a separate layer.

General Information

Algorithm
name Longest-Path Ranking
long name Longest-Path Ranking
author
Implementation
author C. Gutwenger
date May 1998
version 1.0

Pre- and Postcondition

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

Exchangeable Modules Instances of type LongestPathRanking provide the following module options:

$ \bullet$
subgraph
an SubgraphModule option used for computing a maximal acyclic subgraph.

guaranteed precondition: {directed}
required postcondition: $\{\emph{ directed, maximal{\_}acyclic }\}$
initial module: LEDAMakeAcyclic

Optional Parameters Instances of LongestPathRanking provide the following optional parameters:

$ \bullet$
bool separate_deg0_layer = true
a boolean value determining if the nodes with degree 0 are placed on a separate layer, i.e., they get the highest rank.

#include < AGD/LongestPathRanking.h >

Creation

LongestPathRanking R(bool sdl = true) creates an instance R of type LongestPathRanking. Sets the option separate_deg0_layer to sdl.

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)

Access to Options

bool R.set_subgraph(const SubgraphModule& M)

bool R.separate_deg0_layer()

void R.separate_deg0_layer(bool sdl)

Implementation

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


next up previous contents index
Next: Ranking to Minimize Edge Up: Rank Assignment Previous: RankAssignment Modules ( RankAssignment   Contents   Index

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