Changes for page KLay Layered
Last modified by Richard Kreissig on 2023/09/14 09:07
Summary
-
Page properties (1 modified, 0 added, 0 removed)
-
Objects (1 modified, 0 added, 0 removed)
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 edgesuchthat the {{code language="none"}}ReversedEdgeRestorer {{/code}}will take care of 'back'-reversingtheedge 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 -107517 701 +10751756 - URL
-
... ... @@ -1,1 +1,1 @@ 1 -https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/TUT/pages/107517 70/KLay Layered1 +https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/TUT/pages/10751756/KLay Layered