next up previous contents index
Next: Tree Layout Up: Examples of GDL Specifications Previous: Control Flow Graph

   
The Effect of the Layout Algorithms

The following sequence of layouts shows the same graph visualized by different layout algorithms. The graph is cyclic, so the algorithm tree can't be used.

A key problem is selecting the nodes that appear at the top level of the graph. The layout algorithm looks for candidates that have no incoming edges yet at least one outgoing edge. If such nodes do not exist as in this example (Example 10), the algorithms mindegree, minindegree, maxoutdegree are the most appropriate algorithms.

The fine-tuning phase eliminates long edges, meaning the tuned graph is more compact. Note that the tuned graph created by maxdephtslow need not be of maximum depth because fine-tuning may have reduced the depth further. The tuned graph created by mindepthslow needn't be of minimum depth, either. All these partitioning algorithms are heuristics.

Example 10: A cyclic graph

<>01  graph: {
<>02       xspace: 25 xlspace: 15
<>03       node: { title: "A" label: "Start of all" }
<>04       node: { title: "B" } node: { title: "C" } node: { title: "D" }
<>05       node: { title: "E" } node: { title: "F" } node: { title: "G" }
<>06       node: { title: "H" } node: { title: "I" } node: { title: "J" }
<>07       node: { title: "K" }
<>08       edge: { thickness: 3 sourcename: "A" targetname: "B" }
<>09       edge: { thickness: 3 sourcename: "A" targetname: "C" }
<>10       edge: { thickness: 3 sourcename: "A" targetname: "D" }
<>11       edge: { thickness: 3 sourcename: "A" targetname: "E" }
<>12       edge: { thickness: 3 sourcename: "A" targetname: "F" }
<>13       edge: { thickness: 3 sourcename: "A" targetname: "J" }
<>14       edge: { thickness: 3 sourcename: "B" targetname: "D" }
<>15       edge: { thickness: 3 sourcename: "C" targetname: "E" }
<>16       edge: { thickness: 3 sourcename: "D" targetname: "F" }
<>17       edge: { thickness: 3 sourcename: "F" targetname: "K" }
<>18       edge: { thickness: 3 sourcename: "J" targetname: "K" }
<>19       edge: { thickness: 3 sourcename: "A" targetname: "G" }
<>20       edge: { thickness: 3 sourcename: "G" targetname: "H" }
<>21       edge: { thickness: 3 sourcename: "H" targetname: "I" }
<>22       edge: { thickness: 3 sourcename: "I" targetname: "A" }
<>23  }

Here follows a discussion of all the different hierarchical layout algorithms with and without fine-tuning for this example.


  
Figure 19: Layout Algorithms: normal, dfs, mindepth, minindegree, maxoutdegree and maxdegree
\begin{figure}
\begin{center}
\epsfig{file=pics_vcg/example3a1.eps}
\end{center}\end{figure}


  
Figure 20: Layout Algorithms: minbackward, maxdepth, maxdepthslow and mindepthslow
\begin{figure}
\begin{center}
\epsfig{file=pics_vcg/example3b1.eps}
\end{center}\end{figure}


  
Figure 21: Layout Algorithms: maxindegree, minoutdegree, mindegree and maxdepth
\begin{figure}
\begin{center}
\epsfig{file=pics_vcg/example3c1.eps}
\end{center}\end{figure}


next up previous contents index
Next: Tree Layout Up: Examples of GDL Specifications Previous: Control Flow Graph
© AbsInt Angewandte Informatik GmbH