Baseclasses
Definition
FixedSizeMapper provides a mapping with predefined grid width width_x in x-direction and width_y in y-direction. The size of nodes can be increased or decreased in order to adjust the size to settings of separation and minimal overhang.
The input grid sizes of nodes ( get_node_gride_size() function) are
The nodes are resized, such that a minimal overhang and separation is guaranteed.
The minimal allowed width is
2minoverhang
x + grid
width(v)*width
x and
the maximal allowed width is
(1 + grid
width(v))*width
x - sep
x.
Analogously, the minimal allowed height is
2minoverhang
y + grid
height(v)*width
y and
the maximal allowed height is
(1 + grid
height(v))*width
y - sep
y.
FixedSizeMapper realizes the following mapping functions:
Optional Parameters Instances of FixedSizeMapper provide the following optional parameters:
#include < AGD/FixedSizeMapper.h >
Creation
FixedSizeMapper | 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 FixedSizeMapper, 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
(n) and
the call() function takes time
(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.
© Copyright 1998-2001, Algorithmic Solutions Software GmbH. All rights reserved.
2001-08-13