next up previous contents index
Next: Longest Path-Based One-dim. Compaction Up: Compaction Previous: Compaction   Contents   Index


Compaction Modules ( CompactionModule )

Baseclasses


\begin{picture}(6.5,2.5)
\thicklines
\put(0,1.5){\framebox (5.5,1){\bf AGDMod...
...0,-1){1}}
\put(0.5,0){\framebox (6.5,1){\bf CompactionModule}}
\end{picture}

Definition

CompactionModule is the base class for all compaction modules. A compaction module works on a grid layout or an orthogonal representation of a graph and produces again a grid layout.

Input and Output Parameters

input parameter: graph in$ \_$graph = 1
  ...  
output parameter: GridLayout out$ \_$layout = 1

Implementation of Compaction Algorithms

An implementation of a compaction module must override the protected methods call( G, L) and call( H, L). The first gets as input a constant reference to a graph G and a reference to a GridLayout L which will be modified. The second method gets a constant reference to an OrthogonalRepresentation and returns the computed GridLayout in L.

#include < AGD/CompactionModule.h >

Initialization

CompactionModule C initializes a compaction module.

Operations

Standard Interface

bool C.check(const leda_graph& G, AgdKey& p)
    returns true if G satisfies the precondition of C. Otherwise, false is returned, and message contains the error message.

double C.call(GridLayout& L) implements the compaction algorithm based on the initial GridLayout L and its underlying graph. Returns the new GridLayout in L.

int C.call(const OrthogonalRepresentation& H, GridLayout& L)
    implements the compaction algorithm for OrthogonalRepresentation H. The computed GridLayout will be returned in L.

void C.output_level(int o) sets the output level to o. Reasonable values are o $ \in$ [0...10]. o = 0 causes the algorithm to run in silent mode, a value o > = 10 will create the greatest possible amount of output.

int C.output_level() returns the output level


next up previous contents index
Next: Longest Path-Based One-dim. Compaction Up: Compaction Previous: Compaction   Contents   Index

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