next up previous contents index
Next: Mapping with Adjusted Grid Up: Grid Coordinate Mappers Previous: Grid Coordinate Mapper (   Contents   Index


Mapping with Equal Sized Grid Width ( MaxAllMapper )

Baseclasses


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

Definition

The MaxAll grid coordinate mapper provides a mapping, which guarantees that the distance between two nodes is at least sep, and that the slopes of edge segments are the same as in the grid layout. Moreover, the computation of the mapping takes time linear in the size of G, the total number of bends and the width and height of the grid layout.

The input grid sizes of nodes ( get_node_gride_size() function) are

\begin{eqnarray*}
\HTML{I}{grid\_width}(v) & = & \max\left( 0,\left\lceil \frac{...
...height}(v)+\HTML{I}{sep}}
{\HTML{I}{width}}-1\right\rceil\right)
\end{eqnarray*}

Each row and each column have the same size

$ w_{min} = \max_{v\in V} \left\{ \frac{\HTML{I}{width}(v)+\HTML{I}{sep}}{\HTML{...
...\frac{\HTML{I}{height}(v)+\HTML{I}{sep}}{\HTML{I}{grid\_height}(v)+1}\right\}. $
The nodes are eventually enlarged, such that a minimal overhang is guaranteed:

\begin{eqnarray*}
\HTML{I}{width}'(v) & = & \max(\HTML{I}{width}(v),2\HTML{I}{mi...
...}(v),2\HTML{I}{min\_overhang}+\HTML{I}{grid\_height}(v)*w_{min})
\end{eqnarray*}

MaxAllMapper realizes the following mapping functions:

\begin{eqnarray*}
\varphi_x(\HTML{I}{column}) & = & (\HTML{I}{column}-\HTML{I}{x...
...{row} - \HTML{I}{ymin}) * w_{min} + \HTML{I}{origin}.\HTML{I}{y}
\end{eqnarray*}

The positions of nodes and the polylines of edges are given by the default implementations of GridCoordinateMapper using the mapping functions defined above.

Optional Parameters Instances of MaxAllMapper provide the following optional parameters:

$ \bullet$
double width = 40
determines the grid width used by get_node_grid_size() in order to determine the grid size of nodes.
$ \bullet$
double min_overhang = 2
determines the minimal allowed overhang of each node.
$ \bullet$
double sep = 20
determines the minimal distance (separation) between nodes.
$ \bullet$
DPoint origin = (0, 0)
determines the origin of the coordinate system, that is the point to which the lower left grid point (xmin, ymin) is mapped.

#include < AGD/MaxAllMapper.h >

Creation

MaxAllMapper M(double width = 40, double min_overhang = 2, double sep = 20, DPoint origin = DPoint(0, 0))
    creates an instance M of type MaxAllMapper, and sets the optional parameters width, min_overhang, sep and origin.

Operations

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

void M.get_node_grid_size(const leda_graph& G, GridLayout& gl, const LayoutInterface& A)

void M.get_node_grid_size(const GraphCopy& GC, GridLayout& gl, const LayoutInterface& A)

void M.call(const leda_graph& G, const GridLayout& gl, LayoutInterface& A)

void M.call(const GraphCopy& GC, const GridLayout& gl, LayoutInterface& A)

Access to Options

double M.width()

void M.width(double x)

double M.min_overhang()

void M.min_overhang(double x)

double M.sep()

void M.sep(double x)

DPoint M.origin()

void M.origin(DPoint p)

Implementation

The get_node_size() function takes time $ \protectO$(n) and the call() function takes time $ \protectO$(n + m + b), where n is the number of nodes and m is the number of edges of G, and b is the total number of bend points.


next up previous contents index
Next: Mapping with Adjusted Grid Up: Grid Coordinate Mappers Previous: Grid Coordinate Mapper (   Contents   Index

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