5 Graph Description Language (GDL) - Absint
5 Graph Description Language (GDL) - Absint
5 Graph Description Language (GDL) - Absint
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
The ordering of nodes within one level influences the weights of the adjacent levels, consequently<br />
this is performed iteratively until a user-defined maximum is reached or no more improvements<br />
are recognized. This is phase 1 of the crossing reduction.<br />
If the weights of some nodes are equal a permutation of these nodes is tried. Sometimes a permutation<br />
enables crossings to be reduced even further (optional phase 2 of crossing reduction).<br />
There are four possibilities to calculate weights for crossing heuristics. The default weights are<br />
barycenter weights [STM81], while mediancenter weights [GNV88] are sometimes more appropriate,<br />
especially if the average degree (number of edges) of nodes is small. barymedian weights<br />
are the combination of barycenter and mediancenter, where barycenter is considered first and mediancenter<br />
is only used for nodes whose barycenter weights are equal. Conversely, medianbary<br />
weights are the combination of barycenter and mediancenter, where mediancenter is considered<br />
first. The weights can be selected interactively in the Layout dialog box, or statically in the <strong>GDL</strong><br />
specification. See graph attribute crossing_weight (p. 69).<br />
However, the final result needn’t necessarily be optimal as crossing reduction is only a heuristic.<br />
Finally, a local optimization phase tries to improve the layout by exchanging directly neighbored<br />
nodes. See graph attribute crossing_optimization (p. 69)<br />
6.4.3 Coordinate Calculation<br />
Coordinate calculation follows after partitioning nodes into levels and ordering the nodes within<br />
the levels. Nodes can be aligned at the bottom or at the top of a level or centered at a level, with<br />
there being a minimum distance between levels (yspace). This influences the y coordinates. The x<br />
coordinate has to be calculated such that there is a minimum distance between nodes (xspace) and<br />
a minimum distance between the bend points of edges (xlspace). Furthermode, the layout should<br />
be balanced such that the edges are short and straight.<br />
This achieved by using a special method for downward laid-out trees or performing two general<br />
iteration phases: The first phase simulates a physical pendulum, the nodes being the balls and the<br />
edges the strings. The balls hanging on the strings swing to and fro, i.e. the nodes move within<br />
their level and influence the neighboring nodes until the layout is sparse enough and each node has<br />
sufficient space to be favorably positioned.<br />
Next the nodes are centered with respect to their edges. This phase simulates a rubberband network:<br />
The edges pull on a node with a power proportional to their length, the result being that the<br />
node moves to a position such that the sum of the forces of its edges is zero. Then, the length of<br />
the edges is balanced.<br />
An optional fine-tuning phase tries to recognize long edges and draws them as vertical long line<br />
segments. This is useful for the orthogonal layout methods.<br />
Unfortunately, both physical simulations needn’t be convergent, meaning they may be iterated<br />
infinitely often without resulting in a stable layout. However, these cases are seldom. The number<br />
of iterations is restricted in order to prevent infinite execution, the t message indicating that a<br />
timeout has occurred.<br />
119