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


Mapping with Fixed Grid Width ( FixedGridMapper )

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 FixedGridMapper}}
\end{picture}

Definition

FixedGridMapper provides a mapping with predefined grid width width_x in x-direction and width_y in y-direction.

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{...
...}(v)+\HTML{I}{sep\_y}}
{\HTML{I}{width\_y}}-1\right\rceil\right)
\end{eqnarray*}

The nodes are enlarged, such that a minimal overhang is guaranteed

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

FixedGridMapper realizes the following mapping functions:

\begin{eqnarray*}
\varphi_x(\HTML{I}{column}) & = & (\HTML{I}{column} - \HTML{I}...
...ML{I}{ymin}) * \HTML{I}{width\_y} + \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 FixedGridMapper provide the following optional parameters:

$ \bullet$
double width_x = 40
determines the predefined grid width in x-direction.
$ \bullet$
double width_y = 40
determines the predefined grid width in y-direction.
$ \bullet$
double min_overhang_x = 2
determines the minimal allowed overhang of each node in x-direction.
$ \bullet$
double min_overhang_y = 2
determines the minimal allowed overhang of each node in y-direction.
$ \bullet$
double sep_x = 20
determines the minimal distance (separation) between nodes in x-direction.
$ \bullet$
double sep_y = 20
determines the minimal distance between nodes in y-direction.
$ \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/FixedGridMapper.h >

Creation

FixedGridMapper M(double width_x = 40, double width_y = 40, double min_overhang_x = 2, double min_overhang_y = 2, double sep_x = 20, double sep_y = 20, DPoint origin = DPoint(0, 0))
    creates an instance M of type FixedGridMapper, and sets the optional parameters width_x, width_y, min_overhang_x, min_overhang_y, sep_x, sep_y 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_x()

void M.width_x(double wx)

double M.width_y()

void M.width_y(double wy)

double M.min_overhang_x()

void M.min_overhang_x(double x)

double M.min_overhang_y()

void M.min_overhang_y(double y)

double M.sep_x()

void M.sep_x(double x)

double M.sep_y()

void M.sep_y(double y)

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 Fixed Size Up: Grid Coordinate Mappers Previous: Mapping with Adjusted Grid   Contents   Index

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