Show last authors
1 KLay Layered supports a whole bunch of layout options. Every single one of them is documented here.
2
3 **Contents**
4
5
6
7 {{toc/}}
8
9 = Overview =
10
11 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.
12
13 == Supported KIML Layout Options ==
14
15 KLay Layered supports the following standard layout options defined by KIML. Note that the default value may be altered (highlighted yellow). These layout options are documented on [[KIML's Layout Options page>>doc:KIML Layout Options]].
16
17 |=(((
18 Option
19 )))|=(((
20 ID
21 )))|=(((
22 Type
23 )))|=(((
24 Applies to
25 )))|=(((
26 Default
27 )))
28 |(% colspan="1" %)(% colspan="1" %)
29 (((
30 Additional Port Space
31 )))|(% colspan="1" %)(% colspan="1" %)
32 (((
33 de.cau.cs.kieler.additionalPortSpace
34 )))|(% colspan="1" %)(% colspan="1" %)
35 (((
36 Margins
37 )))|(% colspan="1" %)(% colspan="1" %)
38 (((
39 Nodes
40 )))|(% colspan="1" %)(% colspan="1" %)
41 (((
42 0, 0, 0, 0
43 )))
44 |(((
45 Alignment
46 )))|(((
47 de.cau.cs.kieler.alignment
48 )))|(((
49 Enum
50 )))|(((
51 Nodes
52 )))|(((
53 AUTOMATIC
54 )))
55 |(((
56 Aspect Ratio
57 )))|(((
58 de.cau.cs.kieler.aspectRatio
59 )))|(((
60 Float
61 )))|(((
62 Parents
63 )))|(% class="highlight-yellow" data-highlight-colour="yellow" %)(% class="highlight-yellow" data-highlight-colour="yellow" %)
64 (((
65 1.6
66 )))
67 |(((
68 Border Spacing
69 )))|(((
70 de.cau.cs.kieler.borderSpacing
71 )))|(((
72 Float
73 )))|(((
74 Parents
75 )))|(% class="highlight-yellow" data-highlight-colour="yellow" %)(% class="highlight-yellow" data-highlight-colour="yellow" %)
76 (((
77 20
78 )))
79 |(% colspan="1" %)(% colspan="1" %)
80 (((
81 Comment Box
82 )))|(% colspan="1" %)(% colspan="1" %)
83 (((
84 de.cau.cs.kieler.commentBox
85 )))|(% colspan="1" %)(% colspan="1" %)
86 (((
87 Boolean
88 )))|(% colspan="1" %)(% colspan="1" %)
89 (((
90 Nodes
91 )))|(% colspan="1" %)(% colspan="1" %)
92 (((
93 false
94 )))
95 |(((
96 Debug Mode
97 )))|(((
98 de.cau.cs.kieler.debugMode
99 )))|(((
100 Boolean
101 )))|(((
102 Parents
103 )))|(((
104 false
105 )))
106 |(% colspan="1" %)(% colspan="1" %)
107 (((
108 Diagram Type
109 )))|(% colspan="1" %)(% colspan="1" %)
110 (((
111 de.cau.cs.kieler.diagramType
112 )))|(% colspan="1" %)(% colspan="1" %)
113 (((
114 String
115 )))|(% colspan="1" %)(% colspan="1" %)
116 (((
117
118 )))|(% colspan="1" %)(% colspan="1" %)
119 (((
120
121 )))
122 |(((
123 Direction
124 )))|(((
125 de.cau.cs.kieler.direction
126 )))|(((
127 Enum
128 )))|(((
129 Parents
130 )))|(% class="highlight-yellow" data-highlight-colour="yellow" %)(% class="highlight-yellow" data-highlight-colour="yellow" %)
131 (((
132 RIGHT
133 )))
134 |(% colspan="1" %)(% colspan="1" %)
135 (((
136 Edge Label Placement
137 )))|(% colspan="1" %)(% colspan="1" %)
138 (((
139 de.cau.cs.kieler.edgeLabelPlacement
140 )))|(% colspan="1" %)(% colspan="1" %)
141 (((
142 Enum
143 )))|(% colspan="1" %)(% colspan="1" %)
144 (((
145 Labels
146 )))|(% colspan="1" %)(% colspan="1" %)
147 (((
148 UNDEFINED
149 )))
150 |(((
151 Edge Routing
152 )))|(((
153 de.cau.cs.kieler.edgeRouting
154 )))|(((
155 Enum
156 )))|(((
157 Parents
158 )))|(% class="highlight-yellow" data-highlight-colour="yellow" %)(% class="highlight-yellow" data-highlight-colour="yellow" %)
159 (((
160 POLYLINE
161 )))
162 |(% colspan="1" %)(% colspan="1" %)
163 (((
164 Hypernode
165 )))|(% colspan="1" %)(% colspan="1" %)
166 (((
167 de.cau.cs.kieler.hypernode
168 )))|(% colspan="1" %)(% colspan="1" %)
169 (((
170 Boolean
171 )))|(% colspan="1" %)(% colspan="1" %)
172 (((
173 Nodes
174 )))|(% colspan="1" %)(% colspan="1" %)
175 (((
176 false
177 )))
178 |(% colspan="1" %)(% colspan="1" %)
179 (((
180 Label Side
181 )))|(% colspan="1" %)(% colspan="1" %)
182 (((
183 de.cau.cs.kieler.labelSide
184 )))|(% colspan="1" %)(% colspan="1" %)
185 (((
186 Enum
187 )))|(% colspan="1" %)(% colspan="1" %)
188 (((
189 Parents
190 )))|(% colspan="1" %)(% colspan="1" %)
191 (((
192 SMART
193 )))
194 |(((
195 Label Spacing
196 )))|(((
197 de.cau.cs.kieler.labelSpacing
198 )))|(((
199 Float
200 )))|(((
201 Edges
202 Nodes
203 )))|(((
204 -1.0
205 )))
206 |(((
207 Layout Hierarchy
208 )))|(((
209 de.cau.cs.kieler.layoutHierarchy
210 )))|(((
211 Boolean
212 )))|(((
213 Parents
214 )))|(((
215 false
216 )))
217 |(% colspan="1" %)(% colspan="1" %)
218 (((
219 Minimal Height
220 )))|(% colspan="1" %)(% colspan="1" %)
221 (((
222 de.cau.cs.kieler.minHeight
223 )))|(% colspan="1" %)(% colspan="1" %)
224 (((
225 Float
226 )))|(% colspan="1" %)(% colspan="1" %)
227 (((
228 Nodes
229 Parents
230 )))|(% colspan="1" %)(% colspan="1" %)
231 (((
232 0.0
233 )))
234 |(% colspan="1" %)(% colspan="1" %)
235 (((
236 Minimal Width
237 )))|(% colspan="1" %)(% colspan="1" %)
238 (((
239 de.cau.cs.kieler.minWidth
240 )))|(% colspan="1" %)(% colspan="1" %)
241 (((
242 Float
243 )))|(% colspan="1" %)(% colspan="1" %)
244 (((
245 Nodes
246 Parents
247 )))|(% colspan="1" %)(% colspan="1" %)
248 (((
249 0.0
250 )))
251 |(% colspan="1" %)(% colspan="1" %)
252 (((
253 No Layout
254 )))|(% colspan="1" %)(% colspan="1" %)
255 (((
256 de.cau.cs.kieler.noLayout
257 )))|(% colspan="1" %)(% colspan="1" %)
258 (((
259 Boolean
260 )))|(% colspan="1" %)(% colspan="1" %)
261 (((
262
263 )))|(% colspan="1" %)(% colspan="1" %)
264 (((
265 false
266 )))
267 |(% colspan="1" %)(% colspan="1" %)
268 (((
269 Node Label Placement
270 )))|(% colspan="1" %)(% colspan="1" %)
271 (((
272 de.cau.cs.kieler.nodeLabelPlacement
273 )))|(% colspan="1" %)(% colspan="1" %)
274 (((
275 EnumSet
276 )))|(% colspan="1" %)(% colspan="1" %)
277 (((
278 Nodes
279 )))|(% colspan="1" %)(% colspan="1" %)
280 (((
281
282 )))
283 |(((
284 Port Constraints
285 )))|(((
286 de.cau.cs.kieler.portConstraints
287 )))|(((
288 Enum
289 )))|(((
290 Nodes
291 )))|(((
292 UNDEFINED
293 )))
294 |(% colspan="1" %)(% colspan="1" %)
295 (((
296 Port Label Placement
297 )))|(% colspan="1" %)(% colspan="1" %)
298 (((
299 de.cau.cs.kieler.portLabelPlacement
300 )))|(% colspan="1" %)(% colspan="1" %)
301 (((
302 Enum
303 )))|(% colspan="1" %)(% colspan="1" %)
304 (((
305 Nodes
306 )))|(% colspan="1" %)(% colspan="1" %)
307 (((
308 OUTSIDE
309 )))
310 |(% colspan="1" %)(% colspan="1" %)
311 (((
312 Port Offset
313 )))|(% colspan="1" %)(% colspan="1" %)
314 (((
315 de.cau.cs.kieler.offset
316 )))|(% colspan="1" %)(% colspan="1" %)
317 (((
318 Float
319 )))|(% colspan="1" %)(% colspan="1" %)
320 (((
321 Ports
322 )))|(% colspan="1" %)(% colspan="1" %)
323 (((
324
325 )))
326 |(% colspan="1" %)(% colspan="1" %)
327 (((
328 Port Side
329 )))|(% colspan="1" %)(% colspan="1" %)
330 (((
331 de.cau.cs.kieler.portSide
332 )))|(% colspan="1" %)(% colspan="1" %)
333 (((
334 Enum
335 )))|(% colspan="1" %)(% colspan="1" %)
336 (((
337 Ports
338 )))|(% colspan="1" %)(% colspan="1" %)
339 (((
340 UNDEFINED
341 )))
342 |(% colspan="1" %)(% colspan="1" %)
343 (((
344 Port Spacing
345 )))|(% colspan="1" %)(% colspan="1" %)
346 (((
347 de.cau.cs.kieler.portSpacing
348 )))|(% colspan="1" %)(% colspan="1" %)
349 (((
350 Float
351 )))|(% colspan="1" %)(% colspan="1" %)
352 (((
353 Nodes
354 )))|(% colspan="1" %)(% colspan="1" %)
355 (((
356
357 )))
358 |(((
359 Priority
360 )))|(((
361 de.cau.cs.kieler.priority
362 )))|(((
363 Int
364 )))|(((
365 Edges
366 Nodes
367 )))|(((
368
369 )))
370 |(% colspan="1" %)(% colspan="1" %)
371 (((
372 Randomization Seed
373 )))|(% colspan="1" %)(% colspan="1" %)
374 (((
375 de.cau.cs.kieler.randomSeed
376 )))|(% colspan="1" %)(% colspan="1" %)
377 (((
378 Int
379 )))|(% colspan="1" %)(% colspan="1" %)
380 (((
381 Parents
382 )))|(% class="highlight-yellow" colspan="1" data-highlight-colour="yellow" %)(% class="highlight-yellow" colspan="1" data-highlight-colour="yellow" %)
383 (((
384 1
385 )))
386 |(% colspan="1" %)(% colspan="1" %)
387 (((
388 Separate Connected Components
389 )))|(% colspan="1" %)(% colspan="1" %)
390 (((
391 de.cau.cs.kieler.separateConnComp
392 )))|(% colspan="1" %)(% colspan="1" %)
393 (((
394 Boolean
395 )))|(% colspan="1" %)(% colspan="1" %)
396 (((
397 Parents
398 )))|(% class="highlight-yellow" colspan="1" data-highlight-colour="yellow" %)(% class="highlight-yellow" colspan="1" data-highlight-colour="yellow" %)
399 (((
400 true
401 )))
402 |(% colspan="1" %)(% colspan="1" %)
403 (((
404 Size Constraint
405 )))|(% colspan="1" %)(% colspan="1" %)
406 (((
407 de.cau.cs.kieler.sizeConstraint
408 )))|(% colspan="1" %)(% colspan="1" %)
409 (((
410 EnumSet
411 )))|(% colspan="1" %)(% colspan="1" %)
412 (((
413 Nodes
414 )))|(% colspan="1" %)(% colspan="1" %)
415 (((
416
417 )))
418 |(% colspan="1" %)(% colspan="1" %)
419 (((
420 Size Options
421 )))|(% colspan="1" %)(% colspan="1" %)
422 (((
423 de.cau.cs.kieler.sizeOptions
424 )))|(% colspan="1" %)(% colspan="1" %)
425 (((
426 EnumSet
427 )))|(% colspan="1" %)(% colspan="1" %)
428 (((
429 Nodes
430 )))|(% colspan="1" %)(% colspan="1" %)
431 (((
432 DEFAULT_MINIMUM_SIZE
433 )))
434 |(% colspan="1" %)(% colspan="1" %)
435 (((
436 Spacing
437 )))|(% colspan="1" %)(% colspan="1" %)
438 (((
439 de.cau.cs.kieler.spacing
440 )))|(% colspan="1" %)(% colspan="1" %)
441 (((
442 Float
443 )))|(% colspan="1" %)(% colspan="1" %)
444 (((
445 Parents
446 )))|(% class="highlight-yellow" colspan="1" data-highlight-colour="yellow" %)(% class="highlight-yellow" colspan="1" data-highlight-colour="yellow" %)
447 (((
448 20
449 )))
450
451 == Custom Layout Options ==
452
453 |=(((
454 Option
455 )))|=(((
456 ID
457 )))|=(((
458 Type
459 )))|=(((
460 Applies to
461 )))|=(((
462 Default
463 )))|=(% colspan="1" %)(% colspan="1" %)
464 (((
465 Dependency
466 )))
467 |(((
468 [[Crossing Minimization>>doc:||anchor="crossingMinimization"]]
469 )))|(((
470 de.cau.cs.kieler.klay.layered.crossMin
471 )))|(((
472 Enum
473 )))|(((
474 Parents
475 )))|(((
476 LAYER_SWEEP
477 )))|(% colspan="1" %)(% colspan="1" %)
478 (((
479
480 )))
481 |(((
482 [[Cycle Breaking>>doc:||anchor="cycleBre"]]
483 )))|(((
484 de.cau.cs.kieler.klay.layered.cycleBreaking
485 )))|(((
486 Enum
487 )))|(((
488 Parents
489 )))|(((
490 GREEDY
491 )))|(% colspan="1" %)(% colspan="1" %)
492 (((
493
494 )))
495 |(((
496 [[Edge Spacing Factor>>doc:||anchor="edgeSpacingFactor"]]
497 )))|(((
498 de.cau.cs.kieler.klay.layered.edgeSpacingFactor
499 )))|(((
500 Float
501 )))|(((
502 Parents
503 )))|(((
504 0.5
505 )))|(% colspan="1" %)(% colspan="1" %)
506 (((
507
508 )))
509 |(% colspan="1" %)(% colspan="1" %)
510 (((
511 [[Edge Label Side Selection>>doc:||anchor="edgeLabelSideSelection"]]
512 )))|(% colspan="1" %)(% colspan="1" %)
513 (((
514 de.cau.cs.kieler.klay.layered.edgeLabelSideSelection
515 )))|(% colspan="1" %)(% colspan="1" %)
516 (((
517 Enum
518 )))|(% colspan="1" %)(% colspan="1" %)
519 (((
520 Parents
521 )))|(% colspan="1" %)(% colspan="1" %)
522 (((
523 SMART
524 )))|(% colspan="1" %)(% colspan="1" %)
525 (((
526
527 )))
528 |(% colspan="1" %)(% colspan="1" %)
529 (((
530 [[Feedback Edges>>doc:||anchor="feedbackEdges"]]
531 )))|(% colspan="1" %)(% colspan="1" %)
532 (((
533 de.cau.cs.kieler.klay.layered.feedBackEdges
534 )))|(% colspan="1" %)(% colspan="1" %)
535 (((
536 Boolean
537 )))|(% colspan="1" %)(% colspan="1" %)
538 (((
539 Parents
540 )))|(% colspan="1" %)(% colspan="1" %)
541 (((
542 false
543 )))|(% colspan="1" %)(% colspan="1" %)
544 (((
545
546 )))
547 |(% colspan="1" %)(% colspan="1" %)
548 (((
549 [[Fixed Alignment>>doc:||anchor="fixedAlignment"]]
550 )))|(% colspan="1" %)(% colspan="1" %)
551 (((
552 de.cau.cs.kieler.klay.layered.fixedAlignment
553 )))|(% colspan="1" %)(% colspan="1" %)
554 (((
555 Enum
556 )))|(% colspan="1" %)(% colspan="1" %)
557 (((
558 Parents
559 )))|(% colspan="1" %)(% colspan="1" %)
560 (((
561 NONE
562 )))|(% colspan="1" %)(% colspan="1" %)
563 (((
564 nodePlace=BRANDES_KOEPF
565 )))
566 |(% colspan="1" %)(% colspan="1" %)
567 (((
568 [[Interactive Reference Point>>doc:||anchor="interactiveReferencePoint"]]
569 )))|(% colspan="1" %)(% colspan="1" %)
570 (((
571 de.cau.cs.kieler.klay.layered.interactiveReferencePoint
572 )))|(% colspan="1" %)(% colspan="1" %)
573 (((
574 Enum
575 )))|(% colspan="1" %)(% colspan="1" %)
576 (((
577 Parents
578 )))|(% colspan="1" %)(% colspan="1" %)
579 (((
580 CENTER
581 )))|(% colspan="1" %)(% colspan="1" %)
582 (((
583
584 )))
585 |(% colspan="1" %)(% colspan="1" %)
586 (((
587 [[Layer Constraint>>doc:||anchor="layerConstraint"]]
588 )))|(% colspan="1" %)(% colspan="1" %)
589 (((
590 de.cau.cs.kieler.klay.layered.layerConstraint
591 )))|(% colspan="1" %)(% colspan="1" %)
592 (((
593 Enum
594 )))|(% colspan="1" %)(% colspan="1" %)
595 (((
596 Nodes
597 )))|(% colspan="1" %)(% colspan="1" %)
598 (((
599 NONE
600 )))|(% colspan="1" %)(% colspan="1" %)
601 (((
602
603 )))
604 |(% colspan="1" %)(% colspan="1" %)
605 (((
606 [[Maximal Iterations>>doc:||anchor="maximalIterations"]]
607 )))|(% colspan="1" %)(% colspan="1" %)
608 (((
609 de.cau.cs.kieler.klay.layered.nodeLayering
610 )))|(% colspan="1" %)(% colspan="1" %)
611 (((
612 Int
613 )))|(% colspan="1" %)(% colspan="1" %)
614 (((
615 Parents
616 )))|(% colspan="1" %)(% colspan="1" %)
617 (((
618 10.000.000
619 )))|(% colspan="1" %)(% colspan="1" %)
620 (((
621 nodeLayering=NETWORK_SIMPLEX
622 )))
623 |(% colspan="1" %)(% colspan="1" %)
624 (((
625 [[Merge Edges>>doc:||anchor="mergeEdges"]]
626 )))|(% colspan="1" %)(% colspan="1" %)
627 (((
628 de.cau.cs.kieler.klay.layered.mergePorts
629 )))|(% colspan="1" %)(% colspan="1" %)
630 (((
631 Boolean
632 )))|(% colspan="1" %)(% colspan="1" %)
633 (((
634 Parents
635 )))|(% colspan="1" %)(% colspan="1" %)
636 (((
637 false
638 )))|(% colspan="1" %)(% colspan="1" %)
639 (((
640
641 )))
642 |(% colspan="1" %)(% colspan="1" %)
643 (((
644 [[Merge Hierarchy-Crossing Edges>>doc:||anchor="mergeHierarchyEdges"]]
645 )))|(% colspan="1" %)(% colspan="1" %)
646 (((
647 de.cau.cs.kieler.klay.layered.mergeHierarchyPorts
648 )))|(% colspan="1" %)(% colspan="1" %)
649 (((
650 Boolean
651 )))|(% colspan="1" %)(% colspan="1" %)
652 (((
653 Parents
654 )))|(% colspan="1" %)(% colspan="1" %)
655 (((
656 true
657 )))|(% colspan="1" %)(% colspan="1" %)
658 (((
659 layoutHierarchy=true
660 )))
661 |(((
662 [[Node Layering>>doc:||anchor="nodeLayering"]]
663 )))|(((
664 de.cau.cs.kieler.klay.layered.nodeLayering
665 )))|(((
666 Enum
667 )))|(((
668 Parents
669 )))|(((
670 NETWORK_SIMPLEX
671 )))|(% colspan="1" %)(% colspan="1" %)
672 (((
673
674 )))
675 |(% colspan="1" %)(% colspan="1" %)
676 (((
677 [[Node Placement>>doc:||anchor="nodePlacement"]]
678 )))|(% colspan="1" %)(% colspan="1" %)
679 (((
680 de.cau.cs.kieler.klay.layered.nodePlace
681 )))|(% colspan="1" %)(% colspan="1" %)
682 (((
683 Enum
684 )))|(% colspan="1" %)(% colspan="1" %)
685 (((
686 Parents
687 )))|(% colspan="1" %)(% colspan="1" %)
688 (((
689 BRANDES_KOEPF
690 )))|(% colspan="1" %)(% colspan="1" %)
691 (((
692
693 )))
694 |(% colspan="1" %)(% colspan="1" %)
695 (((
696 [[Port Anchor Offset>>doc:||anchor="portAnchor"]]
697 )))|(% colspan="1" %)(% colspan="1" %)
698 (((
699 de.cau.cs.kieler.klay.layered.portAnchor
700 )))|(% colspan="1" %)(% colspan="1" %)
701 (((
702 Object
703 )))|(% colspan="1" %)(% colspan="1" %)
704 (((
705 Ports
706 )))|(% colspan="1" %)(% colspan="1" %)
707 (((
708
709 )))|(% colspan="1" %)(% colspan="1" %)
710 (((
711
712 )))
713 |(((
714 [[Thoroughness>>doc:||anchor="thoroughness"]]
715 )))|(((
716 de.cau.cs.kieler.klay.layered.thoroughness
717 )))|(((
718 Int
719 )))|(((
720 Parents
721 )))|(((
722 7
723 )))|(% colspan="1" %)(% colspan="1" %)
724 (((
725
726 )))
727
728 = Detailed Documentation =
729
730 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.
731
732 == Crossing Minimization ==
733
734
735
736 {{id name="crossingMinimization"/}}
737
738 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:
739
740 * LAYER_SWEEP
741 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.
742 * INTERACTIVE
743 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.
744
745 == Cycle Breaking ==
746
747
748
749 {{id name="cycleBreaking"/}}
750
751 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:
752
753 * GREEDY
754 This algorithm reverses edges greedily. The algorithm tries to avoid edges that have the //Priority// property set.
755 * INTERACTIVE
756 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.
757
758 == Edge Spacing Factor ==
759
760
761
762 {{id name="edgeSpacingFactor"/}}
763
764 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.
765
766 [[image:attach:edgeSpacingFactor.png]]
767
768 == Edge Label Side Selection ==
769
770
771
772 {{id name="edgeLabelSideSelection"/}}
773
774 Determines how KLay Layered places edge labels. The following strategies are available:
775
776 * ALWAYS_UP
777 Always places edge labels above the edge.
778 * ALWAYS_DOWN
779 Always places edge labels below the edge.
780 * DIRECTION_UP
781 Places edge labels above edges pointing right, and below edges pointing left.
782 * DIRECTION_DOWN
783 Places edge labels below edges pointing right, and above edges pointing left.
784 * SMART
785 Uses a heuristic that determines the best edge label placement, also taking the placement of port labels into account.
786
787 == Feedback Edges ==
788
789
790
791 {{id name="feedbackEdges"/}}
792
793 Feedback edges are edges that feed the output of a node back to be the input of a previous node. This option controls how feedback edges are routed if port constraints are FREE. This influences how much emphasis is put on feedback edges.
794
795 With feedback edges:
796
797 [[image:attach:feedback_on.png]]
798
799 Without feedback edges:
800
801 [[image:attach:feedback_off.png]]
802
803 == Fixed Alignment ==
804
805
806
807 {{id name="fixedAlignment"/}}
808
809 The BRANDES_KOEPF node placement algorithm computes several different node placements. One of the placements is chosen by the algorithm, usually the one that takes the least amount of space. With this option, a particular result can be chosen.
810
811 This option should usually be left alone.
812
813 == Interactive Reference Point ==
814
815
816
817 {{id name="interactiveReferencePoint"/}}
818
819 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:
820
821 * TOP_LEFT
822 The top left corner of a node is taken as the reference point.
823 * CENTER
824 The center of a node is taken as the reference point.
825
826 == Layer Constraint ==
827
828
829
830 {{id name="layerConstraint"/}}
831
832 The layer a node is placed in is usually computed by the layer assignment algorithms. However, sometimes certain nodes need to be placed in the first or in the last layer (for example, nodes that represent inputs from the outside). The layer constraint option can be set on such nodes to do just that.
833
834 [[image:attach:layer_constraints.png]]
835
836 {{note}}
837 This option can also be set to {{code language="none"}}FIRST_SEPARATE{{/code}} and {{code language="none"}}LAST_SEPARATE{{/code}}. These are for internal use only and should not have been publicly exposed in the first place. Using them can result in layout problems.
838 {{/note}}
839
840 == Maximal Iterations ==
841
842
843
844 {{id name="maximalIterations"/}}
845
846 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.
847
848 == Merge Edges ==
849
850
851
852 {{id name="mergeEdges"/}}
853
854 In the KGraph model, edges can either connect to nodes through ports or directly. In the latter case, KLay Layered will introduce a virtual port for each edge, which results in all edges connecting to the node at different points in the final drawing. If this option is switched on, KLay Layered will only generate up to one input and one output port for each node. The option is set on a parent node and applies to all of its children, but not to the parent node itself.
855
856 [[image:attach:merging.png]]
857
858 == Merge Hierarchy-Crossing Edges ==
859
860
861
862 {{id name="mergeHierarchyEdges"/}}
863
864 If hierarchical layout is active, this option is the hierarchical equivalent to //Merge Edges//. If set to true on a compound node, all hierarchy-crossing edges that start or end inside that compound node are eligible for merging.
865
866 [[image:attach:merge_hierarchy_edges.png]]
867
868 == Node Layering ==
869
870
871
872 {{id name="nodeLayering"/}}
873
874 Decides which algorithm is used to compute the layer each node is placed in. We have different algorithms available, with different optimization goals:
875
876 * NETWORK_SIMPLEX
877 This algorithm tries to minimize the length of edges. This is the most computationally intensive algorithm. The number of iterations after which it aborts if it hasn't found a result yet can be set with the [[Maximal Iterations>>doc:||anchor="maximalInterations"]] option.
878 * LONGEST_PATH
879 A very simple algorithm that distributes nodes along their longest path to a sink node.
880 * INTERACTIVE
881 Distributes the nodes into layers by comparing their positions before the layout algorithm was started. The idea is that the relative horizontal 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 node layering algorithm uses the //Interactive Reference Point// option to determine which reference point of nodes are used to compare positions.
882
883 == Node Placement ==
884
885
886
887 {{id name="nodePlacement"/}}
888
889 Decides which algorithm is used to compute the y coordinate of each node. This influences the length of edges, the number of edge bends, and the height of the diagram. We have different algorithms available, with different optimization goals:
890
891 * BRANDES_KOEPF
892 Minimizes the number of edge bends at the expense of diagram size: diagrams drawn with this algorithm are usually higher than diagrams drawn with other algorithms.
893 * LINEAR_SEGMENTS
894 Computes a balanced placement.
895 * BUCHHEIM_JUENGER_LEIPERT
896 Also computes a balanced placement, but a little faster.
897 * SIMPLE
898 Minimizes the area at the expense of... well, pretty much everything else.
899
900 == Port Anchor Offset ==
901
902
903
904 {{id name="portAnchor"/}}
905
906 Since ports have a size, we need a concrete point inside the port that edges should start or end in. In KLay Layered, this is referred to as the //port anchor//. By default, the center of each port is used as its port anchor, but this behavior can be overridden by setting an explicit port anchor.
907
908 In the following example, the port anchor of the left port was moved upwards, while the port anchor of the second port was moved downwards:
909
910 [[image:attach:port_anchors.png]]
911
912 == Thoroughness ==
913
914
915
916 {{id name="thoroughness"/}}
917
918 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.