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