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.

» More example graphs:
 

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

graph: {
  node: {title:"A" label:"Start of all"}
  node: {title:"B"}  node: {title:"C"}  node: {title:"D"}
  node: {title:"E"}  node: {title:"F"}  node: {title:"G"}
  node: {title:"H"}  node: {title:"I"}  node: {title:"J"}
  node: {title:"K"}

  edge.thickness: 3
  edge: {source:"A" target:"B"}
  edge: {source:"A" target:"C"}
  edge: {source:"A" target:"D"}
  edge: {source:"A" target:"E"}
  edge: {source:"A" target:"F"}
  edge: {source:"A" target:"J"}
  edge: {source:"B" target:"D"}
  edge: {source:"C" target:"E"}
  edge: {source:"D" target:"F"}
  edge: {source:"F" target:"K"}
  edge: {source:"J" target:"K"}
  edge: {source:"A" target:"G"}
  edge: {source:"G" target:"H"}
  edge: {source:"H" target:"I"}
  edge: {source:"I" target:"A"}
}

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
Layout Algorithms: normal, dfs, mindepth, minindegree, maxoutdegree and maxdegree


  
Figure 20: Layout Algorithms: minbackward, maxdepth, maxdepthslow and mindepthslow
Layout Algorithms: minbackward, maxdepth, maxdepthslow and mindepthslow


  
Figure 21: Layout Algorithms: maxindegree, minoutdegree, mindegree and maxdepth
Layout Algorithms: maxindegree, minoutdegree, mindegree and maxdepth

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