<
From version < 11.1 >
edited by uru
on 2015/04/20 21:39
To version < 9.1 >
edited by uru
on 2015/04/20 21:30
>
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -33,7 +33,7 @@
33 33  {{panel title="Assignment (1)"}}
34 34  Write an intermediate processor that takes a //layered// graph (i.e. the result of assigment 2) as input and reverses edges such that the output graph is acyclic. Here are some hints.
35 35  
36 -The {{code language="none"}}LEdge{{/code}} offers a method {{code language="none"}}reverseEdge{{/code}} that does parts of the job for you and marks the edge such that the {{code language="none"}}ReversedEdgeRestorer {{/code}}will take care of 'back'-reversing the edge at the end of the algorithm. Your class should extend the {{code language="none"}}ILayoutProcessor{{/code}} interface.
36 +The {{code language="none"}}LEdge{{/code}} offers a method {{code language="none"}}reverseEdge{{/code}} that does most of the job for you and marks the edge. The {{code language="none"}}ReversedEdgeRestorer {{/code}}will take care of 'back'-reversing such edges at the end of the algorithm. Your class should extend the {{code language="none"}}ILayoutProcessor{{/code}} interface.
37 37  
38 38  {{code linenumbers="true" language="java"}}
39 39  public class EdgeDirectionEnforcer implements ILayoutProcessor {
... ... @@ -70,22 +70,14 @@
70 70   }
71 71  }
72 72  {{/code}}
73 -{{/panel}}
74 74  
75 75  {{tip}}
76 76  Use {{code language="none"}}node.setLayer(layerX);{{/code}} to add assign a layer to a node. Internally, the node will be added to the layer's list of nodes.
77 -
78 -Don't forget to let the switch statements in the {{code language="none"}}LayeringStrategy{{/code}} and {{code language="none"}}IntermediateProcessorStragety{{/code}} enumerations know about the new classes.
79 79  {{/tip}}
77 +{{/panel}}
80 80  
81 -{{note title="ToDo"}}
82 -How to configure the algorithm.
83 -{{/note}}
84 -
85 85  
86 86  
87 -
88 -
89 89  A result might look like this. The default strategies of KLay Layered try to achieve short edges and a low number of reversed edges. The left screenshot shows the result of a random layerer and is obviously inferior to the result seen in the right screenshot.
90 90  
91 91  
Confluence.Code.ConfluencePageClass[0]
Id
... ... @@ -1,1 +1,1 @@
1 -10751770
1 +10751756
URL
... ... @@ -1,1 +1,1 @@
1 -https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/TUT/pages/10751770/KLay Layered
1 +https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/TUT/pages/10751756/KLay Layered