Show last authors
1 {{warning}}
2 This is preliminary 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 )))
420 |(((
421 Crossing Minimization
422 )))|(((
423 de.cau.cs.kieler.klay.layered.crossMin
424 )))|(((
425 Enum
426 )))|(((
427 Parents
428 )))|(((
429 LAYER_SWEEP
430 )))
431 |(((
432 Cycle Breaking
433 )))|(((
434 de.cau.cs.kieler.klay.layered.cycleBreaking
435 )))|(((
436 Enum
437 )))|(((
438 Parents
439 )))|(((
440 GREEDY
441 )))
442 |(((
443 Distribute Nodes
444 )))|(((
445 de.cau.cs.kieler.klay.layered.distributeNodes
446 )))|(((
447 Boolean
448 )))|(((
449 Parents
450 )))|(((
451 false
452 )))
453 |(((
454 Edge Spacing Factor
455 )))|(((
456 de.cau.cs.kieler.klay.layered.edgeSpacingFactor
457 )))|(((
458 Float
459 )))|(((
460 Parents
461 )))|(((
462 0.5
463 )))
464 |(% colspan="1" %)(% colspan="1" %)
465 (((
466 Feedback Edges
467 )))|(% colspan="1" %)(% colspan="1" %)
468 (((
469 de.cau.cs.kieler.klay.layered.feedBackEdges
470 )))|(% colspan="1" %)(% colspan="1" %)
471 (((
472 Boolean
473 )))|(% colspan="1" %)(% colspan="1" %)
474 (((
475 Parents
476 )))|(% colspan="1" %)(% colspan="1" %)
477 (((
478 false
479 )))
480 |(% colspan="1" %)(% colspan="1" %)
481 (((
482 Fixed Alignment
483 )))|(% colspan="1" %)(% colspan="1" %)
484 (((
485 de.cau.cs.kieler.klay.layered.fixedAlignment
486 )))|(% colspan="1" %)(% colspan="1" %)
487 (((
488 Enum
489 )))|(% colspan="1" %)(% colspan="1" %)
490 (((
491 Parents
492 )))|(% colspan="1" %)(% colspan="1" %)
493 (((
494 NONE
495 )))
496 |(% colspan="1" %)(% colspan="1" %)
497 (((
498 Interactive Reference Point
499 )))|(% colspan="1" %)(% colspan="1" %)
500 (((
501 de.cau.cs.kieler.klay.layered.interactiveReferencePoint
502 )))|(% colspan="1" %)(% colspan="1" %)
503 (((
504 Enum
505 )))|(% colspan="1" %)(% colspan="1" %)
506 (((
507 Parents
508 )))|(% colspan="1" %)(% colspan="1" %)
509 (((
510 CENTER
511 )))
512 |(% colspan="1" %)(% colspan="1" %)
513 (((
514 Label Side
515 )))|(% colspan="1" %)(% colspan="1" %)
516 (((
517 de.cau.cs.kieler.klay.layered.LabelSide
518 )))|(% colspan="1" %)(% colspan="1" %)
519 (((
520 Enum
521 )))|(% colspan="1" %)(% colspan="1" %)
522 (((
523 Parents
524 )))|(% colspan="1" %)(% colspan="1" %)
525 (((
526 SMART
527 )))
528 |(% colspan="1" %)(% colspan="1" %)
529 (((
530 Layer Constraint
531 )))|(% colspan="1" %)(% colspan="1" %)
532 (((
533 de.cau.cs.kieler.klay.layered.layerConstraint
534 )))|(% colspan="1" %)(% colspan="1" %)
535 (((
536 Enum
537 )))|(% colspan="1" %)(% colspan="1" %)
538 (((
539 Nodes
540 )))|(% colspan="1" %)(% colspan="1" %)
541 (((
542 NONE
543 )))
544 |(% colspan="1" %)(% colspan="1" %)
545 (((
546 Merge Edges
547 )))|(% colspan="1" %)(% colspan="1" %)
548 (((
549 de.cau.cs.kieler.klay.layered.mergePorts
550 )))|(% colspan="1" %)(% colspan="1" %)
551 (((
552 Boolean
553 )))|(% colspan="1" %)(% colspan="1" %)
554 (((
555 Parents
556 )))|(% colspan="1" %)(% colspan="1" %)
557 (((
558 false
559 )))
560 |(((
561 Node Layering
562 )))|(((
563 de.cau.cs.kieler.klay.layered.nodeLayering
564 )))|(((
565 Enum
566 )))|(((
567 Parents
568 )))|(((
569 NETWORK_SIMPLEX
570 )))
571 |(% colspan="1" %)(% colspan="1" %)
572 (((
573 Node Placement
574 )))|(% colspan="1" %)(% colspan="1" %)
575 (((
576 de.cau.cs.kieler.klay.layered.nodePlace
577 )))|(% colspan="1" %)(% colspan="1" %)
578 (((
579 Enum
580 )))|(% colspan="1" %)(% colspan="1" %)
581 (((
582 Parents
583 )))|(% colspan="1" %)(% colspan="1" %)
584 (((
585 BRANDES_KOEPF
586 )))
587 |(% colspan="1" %)(% colspan="1" %)
588 (((
589 Port Anchor Offset
590 )))|(% colspan="1" %)(% colspan="1" %)
591 (((
592 de.cau.cs.kieler.klay.layered.portAnchor
593 )))|(% colspan="1" %)(% colspan="1" %)
594 (((
595 Object
596 )))|(% colspan="1" %)(% colspan="1" %)
597 (((
598 Ports
599 )))|(% colspan="1" %)(% colspan="1" %)
600 (((
601
602 )))
603 |(((
604 Thoroughness
605 )))|(((
606 de.cau.cs.kieler.klay.layered.thoroughness
607 )))|(((
608 Int
609 )))|(((
610 Parents
611 )))|(((
612 7
613 )))
614
615 = The Most Important Options =
616
617 **TODO:** Write a bit of documentation about the most important layout options and how to use them, possibly with a simple example or something.
618
619 = Detailed Documentation =
620
621 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.
622
623 == Crossing Minimization ==
624
625 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:
626
627 * LAYER_SWEEP
628 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.
629 * INTERACTIVE
630 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.
631
632 == Cycle Breaking ==
633
634 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:
635
636 * GREEDY
637 This algorithm reverses edges greedily. The algorithm tries to avoid edges that have the //Priority// property set.
638 * INTERACTIVE
639 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.
640
641 == Interactive Reference Point ==
642
643 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:
644
645 * TOP_LEFT
646 The top left corner of a node is taken as the reference point.
647 * CENTER
648 The center of a node is taken as the reference point.
649
650 == Thoroughness ==
651
652 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.