Show last authors
1 {{warning}}
2 This is preliminary and incomplete documentation. You've been warned.
3 {{/warning}}
4
5 KLay Layered supports a whole bunch of layout options. Every single one of them is documented here.
6
7 **Contents**
8
9
10
11 {{toc/}}
12
13 = Overview =
14
15 For a general introduction on layout options, see [[the KIML documentation>>doc:KIML Layout Options]]. KLay Layered supports layout options defined by KIML and defines additional custom layout options.
16
17 == Supported KIML Layout Options ==
18
19 KLay Layered supports the following standard layout options defined by KIML. Note that the default value may be altered (highlighted yellow).
20
21 |=(((
22 Option
23 )))|=(((
24 ID
25 )))|=(((
26 Type
27 )))|=(((
28 Applies to
29 )))|=(((
30 Default
31 )))
32 |(((
33 Alignment
34 )))|(((
35 de.cau.cs.kieler.alignment
36 )))|(((
37 Enum
38 )))|(((
39 Nodes
40 )))|(((
41 AUTOMATIC
42 )))
43 |(((
44 Aspect Ratio
45 )))|(((
46 de.cau.cs.kieler.aspectRatio
47 )))|(((
48 Float
49 )))|(((
50 Parents
51 )))|(% class="highlight-yellow" data-highlight-colour="yellow" %)(% class="highlight-yellow" data-highlight-colour="yellow" %)
52 (((
53 1.6
54 )))
55 |(((
56 Border Spacing
57 )))|(((
58 de.cau.cs.kieler.borderSpacing
59 )))|(((
60 Float
61 )))|(((
62 Parents
63 )))|(% class="highlight-yellow" data-highlight-colour="yellow" %)(% class="highlight-yellow" data-highlight-colour="yellow" %)
64 (((
65 20
66 )))
67 |(% colspan="1" %)(% colspan="1" %)
68 (((
69 Comment Box XX
70 )))|(% colspan="1" %)(% colspan="1" %)
71 (((
72 de.cau.cs.kieler.commentBox
73 )))|(% colspan="1" %)(% colspan="1" %)
74 (((
75 Boolean
76 )))|(% colspan="1" %)(% colspan="1" %)
77 (((
78 Nodes
79 )))|(% colspan="1" %)(% colspan="1" %)
80 (((
81 false
82 )))
83 |(((
84 Debug Mode
85 )))|(((
86 de.cau.cs.kieler.debugMode
87 )))|(((
88 Boolean
89 )))|(((
90 Parents
91 )))|(((
92 false
93 )))
94 |(% colspan="1" %)(% colspan="1" %)
95 (((
96 Diagram Type
97 )))|(% colspan="1" %)(% colspan="1" %)
98 (((
99 de.cau.cs.kieler.diagramType
100 )))|(% colspan="1" %)(% colspan="1" %)
101 (((
102 String
103 )))|(% colspan="1" %)(% colspan="1" %)
104 (((
105
106 )))|(% colspan="1" %)(% colspan="1" %)
107 (((
108
109 )))
110 |(((
111 Direction
112 )))|(((
113 de.cau.cs.kieler.direction
114 )))|(((
115 Enum
116 )))|(((
117 Parents
118 )))|(% class="highlight-yellow" data-highlight-colour="yellow" %)(% class="highlight-yellow" data-highlight-colour="yellow" %)
119 (((
120 RIGHT
121 )))
122 |(% colspan="1" %)(% colspan="1" %)
123 (((
124 Edge Label Placement XX
125 )))|(% colspan="1" %)(% colspan="1" %)
126 (((
127 de.cau.cs.kieler.edgeLabelPlacement
128 )))|(% colspan="1" %)(% colspan="1" %)
129 (((
130 Enum
131 )))|(% colspan="1" %)(% colspan="1" %)
132 (((
133 Labels
134 )))|(% colspan="1" %)(% colspan="1" %)
135 (((
136 UNDEFINED
137 )))
138 |(((
139 Edge Routing
140 )))|(((
141 de.cau.cs.kieler.edgeRouting
142 )))|(((
143 Enum
144 )))|(((
145 Parents
146 )))|(% class="highlight-yellow" data-highlight-colour="yellow" %)(% class="highlight-yellow" data-highlight-colour="yellow" %)
147 (((
148 POLYLINE
149 )))
150 |(% colspan="1" %)(% colspan="1" %)
151 (((
152 Hypernode XX
153 )))|(% colspan="1" %)(% colspan="1" %)
154 (((
155 de.cau.cs.kieler.hypernode
156 )))|(% colspan="1" %)(% colspan="1" %)
157 (((
158 Boolean
159 )))|(% colspan="1" %)(% colspan="1" %)
160 (((
161 Nodes
162 )))|(% colspan="1" %)(% colspan="1" %)
163 (((
164 false
165 )))
166 |(((
167 Label Spacing XX
168 )))|(((
169 de.cau.cs.kieler.labelSpacing
170 )))|(((
171 Float
172 )))|(((
173 Edges
174 Nodes
175 )))|(((
176 -1.0
177 )))
178 |(((
179 Layout Hierarchy
180 )))|(((
181 de.cau.cs.kieler.layoutHierarchy
182 )))|(((
183 Boolean
184 )))|(((
185 Parents
186 )))|(((
187 false
188 )))
189 |(% colspan="1" %)(% colspan="1" %)
190 (((
191 Minimal Height XX
192 )))|(% colspan="1" %)(% colspan="1" %)
193 (((
194 de.cau.cs.kieler.minHeight
195 )))|(% colspan="1" %)(% colspan="1" %)
196 (((
197 Float
198 )))|(% colspan="1" %)(% colspan="1" %)
199 (((
200 Nodes
201 Parents
202 )))|(% colspan="1" %)(% colspan="1" %)
203 (((
204 0.0
205 )))
206 |(% colspan="1" %)(% colspan="1" %)
207 (((
208 Minimal Width XX
209 )))|(% colspan="1" %)(% colspan="1" %)
210 (((
211 de.cau.cs.kieler.minWidth
212 )))|(% colspan="1" %)(% colspan="1" %)
213 (((
214 Float
215 )))|(% colspan="1" %)(% colspan="1" %)
216 (((
217 Nodes
218 Parents
219 )))|(% colspan="1" %)(% colspan="1" %)
220 (((
221 0.0
222 )))
223 |(% colspan="1" %)(% colspan="1" %)
224 (((
225 No Layout XX
226 )))|(% colspan="1" %)(% colspan="1" %)
227 (((
228 de.cau.cs.kieler.noLayout
229 )))|(% colspan="1" %)(% colspan="1" %)
230 (((
231 Boolean
232 )))|(% colspan="1" %)(% colspan="1" %)
233 (((
234
235 )))|(% colspan="1" %)(% colspan="1" %)
236 (((
237 false
238 )))
239 |(% colspan="1" %)(% colspan="1" %)
240 (((
241 Node Label Placement
242 )))|(% colspan="1" %)(% colspan="1" %)
243 (((
244 de.cau.cs.kieler.nodeLabelPlacement
245 )))|(% colspan="1" %)(% colspan="1" %)
246 (((
247 EnumSet
248 )))|(% colspan="1" %)(% colspan="1" %)
249 (((
250 Nodes
251 )))|(% colspan="1" %)(% colspan="1" %)
252 (((
253
254 )))
255 |(((
256 Port Constraints
257 )))|(((
258 de.cau.cs.kieler.portConstraints
259 )))|(((
260 Enum
261 )))|(((
262 Nodes
263 )))|(((
264 UNDEFINED
265 )))
266 |(% colspan="1" %)(% colspan="1" %)
267 (((
268 Port Label Placement
269 )))|(% colspan="1" %)(% colspan="1" %)
270 (((
271 de.cau.cs.kieler.portLabelPlacement
272 )))|(% colspan="1" %)(% colspan="1" %)
273 (((
274 Enum
275 )))|(% colspan="1" %)(% colspan="1" %)
276 (((
277 Nodes
278 )))|(% colspan="1" %)(% colspan="1" %)
279 (((
280 OUTSIDE
281 )))
282 |(% colspan="1" %)(% colspan="1" %)
283 (((
284 Port Offset XX
285 )))|(% colspan="1" %)(% colspan="1" %)
286 (((
287 de.cau.cs.kieler.offset
288 )))|(% colspan="1" %)(% colspan="1" %)
289 (((
290 Float
291 )))|(% colspan="1" %)(% colspan="1" %)
292 (((
293 Ports
294 )))|(% colspan="1" %)(% colspan="1" %)
295 (((
296
297 )))
298 |(% colspan="1" %)(% colspan="1" %)
299 (((
300 Port Side XX
301 )))|(% colspan="1" %)(% colspan="1" %)
302 (((
303 de.cau.cs.kieler.portSide
304 )))|(% colspan="1" %)(% colspan="1" %)
305 (((
306 Enum
307 )))|(% colspan="1" %)(% colspan="1" %)
308 (((
309 Ports
310 )))|(% colspan="1" %)(% colspan="1" %)
311 (((
312 UNDEFINED
313 )))
314 |(((
315 Priority
316 )))|(((
317 de.cau.cs.kieler.priority
318 )))|(((
319 Int
320 )))|(((
321 Edges
322 Nodes
323 )))|(((
324
325 )))
326 |(% colspan="1" %)(% colspan="1" %)
327 (((
328 Randomization Seed
329 )))|(% colspan="1" %)(% colspan="1" %)
330 (((
331 de.cau.cs.kieler.randomSeed
332 )))|(% colspan="1" %)(% colspan="1" %)
333 (((
334 Int
335 )))|(% colspan="1" %)(% colspan="1" %)
336 (((
337 Parents
338 )))|(% class="highlight-yellow" colspan="1" data-highlight-colour="yellow" %)(% class="highlight-yellow" colspan="1" data-highlight-colour="yellow" %)
339 (((
340 1
341 )))
342 |(% colspan="1" %)(% colspan="1" %)
343 (((
344 Separate Connected Components
345 )))|(% colspan="1" %)(% colspan="1" %)
346 (((
347 de.cau.cs.kieler.separateConnComp
348 )))|(% colspan="1" %)(% colspan="1" %)
349 (((
350 Boolean
351 )))|(% colspan="1" %)(% colspan="1" %)
352 (((
353 Parents
354 )))|(% class="highlight-yellow" colspan="1" data-highlight-colour="yellow" %)(% class="highlight-yellow" colspan="1" data-highlight-colour="yellow" %)
355 (((
356 true
357 )))
358 |(% colspan="1" %)(% colspan="1" %)
359 (((
360 Size Constraint
361 )))|(% colspan="1" %)(% colspan="1" %)
362 (((
363 de.cau.cs.kieler.sizeConstraint
364 )))|(% colspan="1" %)(% colspan="1" %)
365 (((
366 EnumSet
367 )))|(% colspan="1" %)(% colspan="1" %)
368 (((
369 Nodes
370 )))|(% colspan="1" %)(% colspan="1" %)
371 (((
372
373 )))
374 |(% colspan="1" %)(% colspan="1" %)
375 (((
376 Size Options
377 )))|(% colspan="1" %)(% colspan="1" %)
378 (((
379 de.cau.cs.kieler.sizeOptions
380 )))|(% colspan="1" %)(% colspan="1" %)
381 (((
382 EnumSet
383 )))|(% colspan="1" %)(% colspan="1" %)
384 (((
385 Nodes
386 )))|(% colspan="1" %)(% colspan="1" %)
387 (((
388 DEFAULT_MINIMUM_SIZE
389 )))
390 |(% colspan="1" %)(% colspan="1" %)
391 (((
392 Spacing
393 )))|(% colspan="1" %)(% colspan="1" %)
394 (((
395 de.cau.cs.kieler.spacing
396 )))|(% colspan="1" %)(% colspan="1" %)
397 (((
398 Float
399 )))|(% colspan="1" %)(% colspan="1" %)
400 (((
401 Parents
402 )))|(% class="highlight-yellow" colspan="1" data-highlight-colour="yellow" %)(% class="highlight-yellow" colspan="1" data-highlight-colour="yellow" %)
403 (((
404 20
405 )))
406
407 == Custom Layout Options ==
408
409 |=(((
410 Option
411 )))|=(((
412 ID
413 )))|=(((
414 Type
415 )))|=(((
416 Applies to
417 )))|=(((
418 Default
419 )))|=(% colspan="1" %)(% colspan="1" %)
420 (((
421 Dependency
422 )))
423 |(((
424 [[Crossing Minimization>>doc:||anchor="crossingMinimizat"]]
425 )))|(((
426 de.cau.cs.kieler.klay.layered.crossMin
427 )))|(((
428 Enum
429 )))|(((
430 Parents
431 )))|(((
432 LAYER_SWEEP
433 )))|(% colspan="1" %)(% colspan="1" %)
434 (((
435
436 )))
437 |(((
438 [[Cycle Breaking>>doc:||anchor="cycleBre"]]
439 )))|(((
440 de.cau.cs.kieler.klay.layered.cycleBreaking
441 )))|(((
442 Enum
443 )))|(((
444 Parents
445 )))|(((
446 GREEDY
447 )))|(% colspan="1" %)(% colspan="1" %)
448 (((
449
450 )))
451 |(((
452 [[Edge Spacing Factor>>doc:||anchor="edgeSpacingFactor"]]
453 )))|(((
454 de.cau.cs.kieler.klay.layered.edgeSpacingFactor
455 )))|(((
456 Float
457 )))|(((
458 Parents
459 )))|(((
460 0.5
461 )))|(% colspan="1" %)(% colspan="1" %)
462 (((
463
464 )))
465 |(% colspan="1" %)(% colspan="1" %)
466 (((
467 Feedback Edges
468 )))|(% colspan="1" %)(% colspan="1" %)
469 (((
470 de.cau.cs.kieler.klay.layered.feedBackEdges
471 )))|(% colspan="1" %)(% colspan="1" %)
472 (((
473 Boolean
474 )))|(% colspan="1" %)(% colspan="1" %)
475 (((
476 Parents
477 )))|(% colspan="1" %)(% colspan="1" %)
478 (((
479 false
480 )))|(% colspan="1" %)(% colspan="1" %)
481 (((
482
483 )))
484 |(% colspan="1" %)(% colspan="1" %)
485 (((
486 Fixed Alignment
487 )))|(% colspan="1" %)(% colspan="1" %)
488 (((
489 de.cau.cs.kieler.klay.layered.fixedAlignment
490 )))|(% colspan="1" %)(% colspan="1" %)
491 (((
492 Enum
493 )))|(% colspan="1" %)(% colspan="1" %)
494 (((
495 Parents
496 )))|(% colspan="1" %)(% colspan="1" %)
497 (((
498 NONE
499 )))|(% colspan="1" %)(% colspan="1" %)
500 (((
501
502 )))
503 |(% colspan="1" %)(% colspan="1" %)
504 (((
505 [[Interactive Reference Point>>doc:||anchor="interactiveReferencePoi"]]
506 )))|(% colspan="1" %)(% colspan="1" %)
507 (((
508 de.cau.cs.kieler.klay.layered.interactiveReferencePoint
509 )))|(% colspan="1" %)(% colspan="1" %)
510 (((
511 Enum
512 )))|(% colspan="1" %)(% colspan="1" %)
513 (((
514 Parents
515 )))|(% colspan="1" %)(% colspan="1" %)
516 (((
517 CENTER
518 )))|(% colspan="1" %)(% colspan="1" %)
519 (((
520
521 )))
522 |(% colspan="1" %)(% colspan="1" %)
523 (((
524 Label Side
525 )))|(% colspan="1" %)(% colspan="1" %)
526 (((
527 de.cau.cs.kieler.klay.layered.LabelSide
528 )))|(% colspan="1" %)(% colspan="1" %)
529 (((
530 Enum
531 )))|(% colspan="1" %)(% colspan="1" %)
532 (((
533 Parents
534 )))|(% colspan="1" %)(% colspan="1" %)
535 (((
536 SMART
537 )))|(% colspan="1" %)(% colspan="1" %)
538 (((
539
540 )))
541 |(% colspan="1" %)(% colspan="1" %)
542 (((
543 Layer Constraint
544 )))|(% colspan="1" %)(% colspan="1" %)
545 (((
546 de.cau.cs.kieler.klay.layered.layerConstraint
547 )))|(% colspan="1" %)(% colspan="1" %)
548 (((
549 Enum
550 )))|(% colspan="1" %)(% colspan="1" %)
551 (((
552 Nodes
553 )))|(% colspan="1" %)(% colspan="1" %)
554 (((
555 NONE
556 )))|(% colspan="1" %)(% colspan="1" %)
557 (((
558
559 )))
560 |(% colspan="1" %)(% colspan="1" %)
561 (((
562 Maximal Iterations
563 )))|(% colspan="1" %)(% colspan="1" %)
564 (((
565 de.cau.cs.kieler.klay.layered.nodeLayering
566 )))|(% colspan="1" %)(% colspan="1" %)
567 (((
568 Int
569 )))|(% colspan="1" %)(% colspan="1" %)
570 (((
571 Parents
572 )))|(% colspan="1" %)(% colspan="1" %)
573 (((
574 10.000.000
575 )))|(% colspan="1" %)(% colspan="1" %)
576 (((
577 nodeLayering=NETWORK_SIMPLEX
578 )))
579 |(% colspan="1" %)(% colspan="1" %)
580 (((
581 Merge Edges
582 )))|(% colspan="1" %)(% colspan="1" %)
583 (((
584 de.cau.cs.kieler.klay.layered.mergePorts
585 )))|(% colspan="1" %)(% colspan="1" %)
586 (((
587 Boolean
588 )))|(% colspan="1" %)(% colspan="1" %)
589 (((
590 Parents
591 )))|(% colspan="1" %)(% colspan="1" %)
592 (((
593 false
594 )))|(% colspan="1" %)(% colspan="1" %)
595 (((
596
597 )))
598 |(((
599 Node Layering
600 )))|(((
601 de.cau.cs.kieler.klay.layered.nodeLayering
602 )))|(((
603 Enum
604 )))|(((
605 Parents
606 )))|(((
607 NETWORK_SIMPLEX
608 )))|(% colspan="1" %)(% colspan="1" %)
609 (((
610
611 )))
612 |(% colspan="1" %)(% colspan="1" %)
613 (((
614 Node Placement
615 )))|(% colspan="1" %)(% colspan="1" %)
616 (((
617 de.cau.cs.kieler.klay.layered.nodePlace
618 )))|(% colspan="1" %)(% colspan="1" %)
619 (((
620 Enum
621 )))|(% colspan="1" %)(% colspan="1" %)
622 (((
623 Parents
624 )))|(% colspan="1" %)(% colspan="1" %)
625 (((
626 BRANDES_KOEPF
627 )))|(% colspan="1" %)(% colspan="1" %)
628 (((
629
630 )))
631 |(% colspan="1" %)(% colspan="1" %)
632 (((
633 Port Anchor Offset
634 )))|(% colspan="1" %)(% colspan="1" %)
635 (((
636 de.cau.cs.kieler.klay.layered.portAnchor
637 )))|(% colspan="1" %)(% colspan="1" %)
638 (((
639 Object
640 )))|(% colspan="1" %)(% colspan="1" %)
641 (((
642 Ports
643 )))|(% colspan="1" %)(% colspan="1" %)
644 (((
645
646 )))|(% colspan="1" %)(% colspan="1" %)
647 (((
648
649 )))
650 |(((
651 [[Thoroughness>>doc:||anchor="thorough"]]
652 )))|(((
653 de.cau.cs.kieler.klay.layered.thoroughness
654 )))|(((
655 Int
656 )))|(((
657 Parents
658 )))|(((
659 7
660 )))|(% colspan="1" %)(% colspan="1" %)
661 (((
662
663 )))
664
665 = The Most Important Options =
666
667 **TODO:** Write a bit of documentation about the most important layout options and how to use them, possibly with a simple example or something.
668
669 = Detailed Documentation =
670
671 This section explains every layout option in more detail. See [[the KIML documentation>>doc:KIML Layout Options]] for more information on KIML layout options. Those options are only mentioned here if KLay Layered adds some custom behavior.
672
673 == Crossing Minimization ==
674
675
676
677 {{id name="crossingMinimization"/}}
678
679 Crossing minimization determines the ordering of nodes in each layer, which influences the number of edge crossings. This option switches between one of several algorithms that can be used to minimize crossings. Possible values are:
680
681 * LAYER_SWEEP
682 The layer sweep algorithm iterates multiple times over the layers, trying to find node orderings that minimize the number of crossings. The algorithm uses randomization to increase the odds of finding a good result. To improve its results, consider increasing the //Thoroughness// option, which influences the number of iterations done. The //Randomization// seed also influences results.
683 * INTERACTIVE
684 Orders the nodes of each layer by comparing their positions before the layout algorithm was started. The idea is that the relative order of nodes as it was before layout was applied is not changed. This of course requires valid positions for all nodes to have been set on the input graph before calling the layout algorithm. The interactive layer sweep algorithm uses the //Interactive Reference Point// option to determine which reference point of nodes are used to compare positions.
685
686 == Cycle Breaking ==
687
688
689
690 {{id name="cycleBreaking"/}}
691
692 KLay Layered tries to position nodes in a way that all edges point rightwards. This is not possible if the input graph has cycles. Such cycles have to be broken by reversing as few edges as possible. The reversed edges end up pointing leftwards in the resulting diagram. There are different cycle breaking algorithms available:
693
694 * GREEDY
695 This algorithm reverses edges greedily. The algorithm tries to avoid edges that have the //Priority// property set.
696 * INTERACTIVE
697 The interactive algorithm tries to reverse edges that already pointed leftwards in the input graph. This requires node and port coordinates to have been set to sensible values.
698
699 == Edge Spacing Factor ==
700
701
702
703 {{id name="edgeSpacingFactor"/}}
704
705 The edge spacing factor determines the amount of space between edges, relative to the regular //Spacing// value. The idea is that we don't need as much space between edges as we do between nodes.
706
707 [[image:attach:edgeSpacingFactor.png]]
708
709 == Interactive Reference Point ==
710
711
712
713 {{id name="interactiveReferencePoint"/}}
714
715 Interactive layering, crossing minimization, and cycle breaking algorithms use node positions to sort nodes into layers or to determine the order of nodes in each layer. However, it is unclear if for example the top left corners of nodes should be compared, or the bottom left corners — different settings might lead to different results. The interactive reference point determines which part of nodes is used to compare their positions. It provides the following settings:
716
717 * TOP_LEFT
718 The top left corner of a node is taken as the reference point.
719 * CENTER
720 The center of a node is taken as the reference point.
721
722
723
724 == Maximal Iterations ==
725
726
727
728 {{id name="networkSimplexMaxIterations"/}}
729
730 Delimits the amount of depth-first-search iterations performed by the network simplex layering strategy. Large, highly connected graphs might require a long time to be processed. This property serves as a timeout after which an exception is raised.
731
732 == Thoroughness ==
733
734
735
736 {{id name="thoroughness"/}}
737
738 There are heuristics in use all over KLay Layered whose results often improve with the number of iterations computed. The thoroughness is a measure for telling KLay Layered to compute more iterations to improve the quality of results, at the expense of performance.