Baseclasses
Definition
MaxEachMapper provides a mapping, which tries to reduce the width and height of the resulting layout, such that the distance between two nodes is at least sep_x in x-direction and sep_y in y-direction.
The input grid sizes of nodes ( get_node_gride_size() function) are
Let wc(x) be the width of column x and wr(y) the width of row y. MaxEachMapper computes a (not necessarily optimal) solution of the two optimization problems
|
min |
||||
| wc(x) | > = |
2min |
for all xmin < = x < = xmax | |
|
|
> = |
width(v) + sep |
for all v |
|
|
min |
||||
| wr(y) | > = |
2min |
for all ymin < = y < = ymax | |
|
|
> = |
height(v) + sep |
for all v |
|
The realized mapping is defined as
Optional Parameters Instances of MaxEachMapper provide the following optional parameters:
#include < AGD/MaxEachMapper.h >
Creation
| MaxEachMapper | 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 MaxEachMapper, 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
Let n be the number of nodes and m the number of edges in G,
b the total number of bend points, s the number of rows and columns
in the grid layout, and denote with
gc(v)
the number of columns and with
gr(v) the number of rows covered by
rect(v). Then, get_node_grid_size() takes time
(n) and call() takes time
© Copyright 1998-2001, Algorithmic Solutions Software GmbH. All rights reserved.
2001-08-13