Changes for page KLay Layered Layout Options
Last modified by Richard Kreissig on 2023/09/14 10:20
Summary
-
Page properties (1 modified, 0 added, 0 removed)
-
Objects (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -1,7 +5,3 @@ 1 -{{warning}} 2 -This is preliminary documentation. You've been warned. 3 -{{/warning}} 4 - 5 5 KLay Layered supports a whole bunch of layout options. Every single one of them is documented here. 6 6 7 7 **Contents** ... ... @@ -16,7 +16,7 @@ 16 16 17 17 == Supported KIML Layout Options == 18 18 19 -KLay Layered supports the following standard layout options defined by KIML. Note that the default value may be altered (highlighted yellow). 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]]. 20 20 21 21 |=((( 22 22 Option ... ... @@ -29,6 +29,22 @@ 29 29 )))|=((( 30 30 Default 31 31 ))) 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 +))) 32 32 |((( 33 33 Alignment 34 34 )))|((( ... ... @@ -66,7 +66,7 @@ 66 66 ))) 67 67 |(% colspan="1" %)(% colspan="1" %) 68 68 ((( 69 -Comment Box XX81 +Comment Box 70 70 )))|(% colspan="1" %)(% colspan="1" %) 71 71 ((( 72 72 de.cau.cs.kieler.commentBox ... ... @@ -108,7 +108,7 @@ 108 108 109 109 ))) 110 110 |((( 111 -Direction 123 +[[Direction>>doc:||anchor="direction"]] 112 112 )))|((( 113 113 de.cau.cs.kieler.direction 114 114 )))|((( ... ... @@ -115,13 +115,12 @@ 115 115 Enum 116 116 )))|((( 117 117 Parents 118 -)))|(% class="highlight-yellow" data-highlight-colour="yellow" %)(% class="highlight-yellow" data-highlight-colour="yellow" %) 119 -((( 120 -RIGHT 130 +)))|((( 131 +UNDEFINED 121 121 ))) 122 122 |(% colspan="1" %)(% colspan="1" %) 123 123 ((( 124 -Edge Label Placement XX135 +Edge Label Placement 125 125 )))|(% colspan="1" %)(% colspan="1" %) 126 126 ((( 127 127 de.cau.cs.kieler.edgeLabelPlacement ... ... @@ -149,7 +149,7 @@ 149 149 ))) 150 150 |(% colspan="1" %)(% colspan="1" %) 151 151 ((( 152 -Hypernode XX163 +Hypernode 153 153 )))|(% colspan="1" %)(% colspan="1" %) 154 154 ((( 155 155 de.cau.cs.kieler.hypernode ... ... @@ -163,8 +163,24 @@ 163 163 ((( 164 164 false 165 165 ))) 177 +|(% colspan="1" %)(% colspan="1" %) 178 +((( 179 +Label Side 180 +)))|(% colspan="1" %)(% colspan="1" %) 181 +((( 182 +de.cau.cs.kieler.labelSide 183 +)))|(% colspan="1" %)(% colspan="1" %) 184 +((( 185 +Enum 186 +)))|(% colspan="1" %)(% colspan="1" %) 187 +((( 188 +Parents 189 +)))|(% colspan="1" %)(% colspan="1" %) 190 +((( 191 +SMART 192 +))) 166 166 |((( 167 -Label Spacing XX194 +Label Spacing 168 168 )))|((( 169 169 de.cau.cs.kieler.labelSpacing 170 170 )))|((( ... ... @@ -188,7 +188,7 @@ 188 188 ))) 189 189 |(% colspan="1" %)(% colspan="1" %) 190 190 ((( 191 -Minimal Height XX218 +Minimal Height 192 192 )))|(% colspan="1" %)(% colspan="1" %) 193 193 ((( 194 194 de.cau.cs.kieler.minHeight ... ... @@ -205,7 +205,7 @@ 205 205 ))) 206 206 |(% colspan="1" %)(% colspan="1" %) 207 207 ((( 208 -Minimal Width XX235 +Minimal Width 209 209 )))|(% colspan="1" %)(% colspan="1" %) 210 210 ((( 211 211 de.cau.cs.kieler.minWidth ... ... @@ -222,7 +222,7 @@ 222 222 ))) 223 223 |(% colspan="1" %)(% colspan="1" %) 224 224 ((( 225 -No Layout XX252 +No Layout 226 226 )))|(% colspan="1" %)(% colspan="1" %) 227 227 ((( 228 228 de.cau.cs.kieler.noLayout ... ... @@ -252,6 +252,22 @@ 252 252 ((( 253 253 254 254 ))) 282 +|(% colspan="1" %)(% colspan="1" %) 283 +((( 284 +(% class="confluence-link" %)Port Anchor Offset 285 +)))|(% colspan="1" %)(% colspan="1" %) 286 +((( 287 +de.cau.cs.kieler.klay.layered.portAnchor 288 +)))|(% colspan="1" %)(% colspan="1" %) 289 +((( 290 +Object 291 +)))|(% colspan="1" %)(% colspan="1" %) 292 +((( 293 +Ports 294 +)))|(% colspan="1" %)(% colspan="1" %) 295 +((( 296 + 297 +))) 255 255 |((( 256 256 Port Constraints 257 257 )))|((( ... ... @@ -281,7 +281,7 @@ 281 281 ))) 282 282 |(% colspan="1" %)(% colspan="1" %) 283 283 ((( 284 -Port Offset XX327 +Port Offset 285 285 )))|(% colspan="1" %)(% colspan="1" %) 286 286 ((( 287 287 de.cau.cs.kieler.offset ... ... @@ -297,7 +297,7 @@ 297 297 ))) 298 298 |(% colspan="1" %)(% colspan="1" %) 299 299 ((( 300 -Port Side XX343 +Port Side 301 301 )))|(% colspan="1" %)(% colspan="1" %) 302 302 ((( 303 303 de.cau.cs.kieler.portSide ... ... @@ -311,6 +311,22 @@ 311 311 ((( 312 312 UNDEFINED 313 313 ))) 357 +|(% colspan="1" %)(% colspan="1" %) 358 +((( 359 +Port Spacing 360 +)))|(% colspan="1" %)(% colspan="1" %) 361 +((( 362 +de.cau.cs.kieler.portSpacing 363 +)))|(% colspan="1" %)(% colspan="1" %) 364 +((( 365 +Float 366 +)))|(% colspan="1" %)(% colspan="1" %) 367 +((( 368 +Nodes 369 +)))|(% class="highlight-yellow" colspan="1" data-highlight-colour="yellow" %)(% class="highlight-yellow" colspan="1" data-highlight-colour="yellow" %) 370 +((( 371 +10 372 +))) 314 314 |((( 315 315 Priority 316 316 )))|((( ... ... @@ -416,9 +416,50 @@ 416 416 Applies to 417 417 )))|=((( 418 418 Default 478 +)))|=(% colspan="1" %)(% colspan="1" %) 479 +((( 480 +Dependency 419 419 ))) 482 +|(% colspan="1" %)(% colspan="1" %) 483 +((( 484 +[[Add Unnecessary Bendpoints>>doc:||anchor="addUnnecessaryBendpoints"]] 485 +)))|(% colspan="1" %)(% colspan="1" %) 486 +((( 487 +de.cau.cs.kieler.klay.layered.unnecessaryBendpoints 488 +)))|(% colspan="1" %)(% colspan="1" %) 489 +((( 490 +Boolean 491 +)))|(% colspan="1" %)(% colspan="1" %) 492 +((( 493 +Parents 494 +)))|(% colspan="1" %)(% colspan="1" %) 495 +((( 496 +false 497 +)))|(% colspan="1" %)(% colspan="1" %) 498 +((( 499 + 500 +))) 501 +|(% colspan="1" %)(% colspan="1" %) 502 +((( 503 +[[Content Alignment>>doc:||anchor="contentAlignment"]] 504 +)))|(% colspan="1" %)(% colspan="1" %) 505 +((( 506 +de.cau.cs.kieler.klay.layered.contentAlignment 507 +)))|(% colspan="1" %)(% colspan="1" %) 508 +((( 509 +EnumSet 510 +)))|(% colspan="1" %)(% colspan="1" %) 511 +((( 512 +Parents 513 +)))|(% colspan="1" %)(% colspan="1" %) 514 +((( 515 +V_TOP, H_LEFT 516 +)))|(% colspan="1" %)(% colspan="1" %) 517 +((( 518 + 519 +))) 420 420 |((( 421 -Crossing Minimization 521 +[[Crossing Minimization>>doc:||anchor="crossingMinimization"]] 422 422 )))|((( 423 423 de.cau.cs.kieler.klay.layered.crossMin 424 424 )))|((( ... ... @@ -427,9 +427,12 @@ 427 427 Parents 428 428 )))|((( 429 429 LAYER_SWEEP 530 +)))|(% colspan="1" %)(% colspan="1" %) 531 +((( 532 + 430 430 ))) 431 431 |((( 432 -Cycle Breaking 535 +[[Cycle Breaking>>doc:||anchor="cycleBre"]] 433 433 )))|((( 434 434 de.cau.cs.kieler.klay.layered.cycleBreaking 435 435 )))|((( ... ... @@ -438,21 +438,13 @@ 438 438 Parents 439 439 )))|((( 440 440 GREEDY 544 +)))|(% colspan="1" %)(% colspan="1" %) 545 +((( 546 + 441 441 ))) 442 442 |((( 443 - Distribute Nodes549 +[[Edge Spacing Factor>>doc:||anchor="edgeSpacingFactor"]] 444 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 456 de.cau.cs.kieler.klay.layered.edgeSpacingFactor 457 457 )))|((( 458 458 Float ... ... @@ -460,12 +460,34 @@ 460 460 Parents 461 461 )))|((( 462 462 0.5 558 +)))|(% colspan="1" %)(% colspan="1" %) 559 +((( 560 + 463 463 ))) 464 464 |(% colspan="1" %)(% colspan="1" %) 465 465 ((( 466 - Feedback Edges564 +[[Edge Label Side Selection>>doc:||anchor="edgeLabelSideSelection"]] 467 467 )))|(% colspan="1" %)(% colspan="1" %) 468 468 ((( 567 +de.cau.cs.kieler.klay.layered.edgeLabelSideSelection 568 +)))|(% colspan="1" %)(% colspan="1" %) 569 +((( 570 +Enum 571 +)))|(% colspan="1" %)(% colspan="1" %) 572 +((( 573 +Parents 574 +)))|(% colspan="1" %)(% colspan="1" %) 575 +((( 576 +ALWAYS_DOWN 577 +)))|(% colspan="1" %)(% colspan="1" %) 578 +((( 579 + 580 +))) 581 +|(% colspan="1" %)(% colspan="1" %) 582 +((( 583 +[[Feedback Edges>>doc:||anchor="feedbackEdges"]] 584 +)))|(% colspan="1" %)(% colspan="1" %) 585 +((( 469 469 de.cau.cs.kieler.klay.layered.feedBackEdges 470 470 )))|(% colspan="1" %)(% colspan="1" %) 471 471 ((( ... ... @@ -476,10 +476,13 @@ 476 476 )))|(% colspan="1" %)(% colspan="1" %) 477 477 ((( 478 478 false 596 +)))|(% colspan="1" %)(% colspan="1" %) 597 +((( 598 + 479 479 ))) 480 480 |(% colspan="1" %)(% colspan="1" %) 481 481 ((( 482 -Fixed Alignment 602 +[[Fixed Alignment>>doc:||anchor="fixedAlignment"]] 483 483 )))|(% colspan="1" %)(% colspan="1" %) 484 484 ((( 485 485 de.cau.cs.kieler.klay.layered.fixedAlignment ... ... @@ -492,10 +492,13 @@ 492 492 )))|(% colspan="1" %)(% colspan="1" %) 493 493 ((( 494 494 NONE 615 +)))|(% colspan="1" %)(% colspan="1" %) 616 +((( 617 +nodePlace=BRANDES_KOEPF 495 495 ))) 496 496 |(% colspan="1" %)(% colspan="1" %) 497 497 ((( 498 -Interactive Reference Point 621 +[[Interactive Reference Point>>doc:||anchor="interactiveReferencePoint"]] 499 499 )))|(% colspan="1" %)(% colspan="1" %) 500 500 ((( 501 501 de.cau.cs.kieler.klay.layered.interactiveReferencePoint ... ... @@ -508,45 +508,54 @@ 508 508 )))|(% colspan="1" %)(% colspan="1" %) 509 509 ((( 510 510 CENTER 634 +)))|(% colspan="1" %)(% colspan="1" %) 635 +((( 636 + 511 511 ))) 512 512 |(% colspan="1" %)(% colspan="1" %) 513 513 ((( 514 -La belSide640 +[[Layer Constraint>>doc:||anchor="layerConstraint"]] 515 515 )))|(% colspan="1" %)(% colspan="1" %) 516 516 ((( 517 -de.cau.cs.kieler.klay.layered. LabelSide643 +de.cau.cs.kieler.klay.layered.layerConstraint 518 518 )))|(% colspan="1" %)(% colspan="1" %) 519 519 ((( 520 520 Enum 521 521 )))|(% colspan="1" %)(% colspan="1" %) 522 522 ((( 523 - Parents649 +Nodes 524 524 )))|(% colspan="1" %)(% colspan="1" %) 525 525 ((( 526 -SMART 652 +NONE 653 +)))|(% colspan="1" %)(% colspan="1" %) 654 +((( 655 + 527 527 ))) 528 528 |(% colspan="1" %)(% colspan="1" %) 529 529 ((( 530 -L ayerConstraint659 +[[Linear Segments Deflection Dampening>>doc:||anchor="deflectionDampening"]] 531 531 )))|(% colspan="1" %)(% colspan="1" %) 532 532 ((( 533 -de.cau.cs.kieler.klay.layered.l ayerConstraint662 +de.cau.cs.kieler.klay.layered.linearSegmentsDeflectionDampening 534 534 )))|(% colspan="1" %)(% colspan="1" %) 535 535 ((( 536 - Enum665 +Float 537 537 )))|(% colspan="1" %)(% colspan="1" %) 538 538 ((( 539 - Nodes668 +Parents 540 540 )))|(% colspan="1" %)(% colspan="1" %) 541 541 ((( 542 -NONE 671 +0.3 672 +)))|(% colspan="1" %)(% colspan="1" %) 673 +((( 674 +nodePlace=LINEAR_SEGMENTS 543 543 ))) 544 544 |(% colspan="1" %)(% colspan="1" %) 545 545 ((( 546 -Merge Edges 678 +[[Merge Edges>>doc:||anchor="mergeEdges"]] 547 547 )))|(% colspan="1" %)(% colspan="1" %) 548 548 ((( 549 -de.cau.cs.kieler.klay.layered.merge Ports681 +de.cau.cs.kieler.klay.layered.mergeEdges 550 550 )))|(% colspan="1" %)(% colspan="1" %) 551 551 ((( 552 552 Boolean ... ... @@ -556,9 +556,31 @@ 556 556 )))|(% colspan="1" %)(% colspan="1" %) 557 557 ((( 558 558 false 691 +)))|(% colspan="1" %)(% colspan="1" %) 692 +((( 693 + 559 559 ))) 695 +|(% colspan="1" %)(% colspan="1" %) 696 +((( 697 +[[Merge Hierarchy-Crossing Edges>>doc:||anchor="mergeHierarchyEdges"]] 698 +)))|(% colspan="1" %)(% colspan="1" %) 699 +((( 700 +de.cau.cs.kieler.klay.layered.mergeHierarchyPorts 701 +)))|(% colspan="1" %)(% colspan="1" %) 702 +((( 703 +Boolean 704 +)))|(% colspan="1" %)(% colspan="1" %) 705 +((( 706 +Parents 707 +)))|(% colspan="1" %)(% colspan="1" %) 708 +((( 709 +true 710 +)))|(% colspan="1" %)(% colspan="1" %) 711 +((( 712 +layoutHierarchy=true 713 +))) 560 560 |((( 561 -Node Layering 715 +[[Node Layering>>doc:||anchor="nodeLayering"]] 562 562 )))|((( 563 563 de.cau.cs.kieler.klay.layered.nodeLayering 564 564 )))|((( ... ... @@ -567,10 +567,13 @@ 567 567 Parents 568 568 )))|((( 569 569 NETWORK_SIMPLEX 724 +)))|(% colspan="1" %)(% colspan="1" %) 725 +((( 726 + 570 570 ))) 571 571 |(% colspan="1" %)(% colspan="1" %) 572 572 ((( 573 -Node Placement 730 +[[Node Placement>>doc:||anchor="nodePlacement"]] 574 574 )))|(% colspan="1" %)(% colspan="1" %) 575 575 ((( 576 576 de.cau.cs.kieler.klay.layered.nodePlace ... ... @@ -583,25 +583,12 @@ 583 583 )))|(% colspan="1" %)(% colspan="1" %) 584 584 ((( 585 585 BRANDES_KOEPF 586 -))) 587 -|(% colspan="1" %)(% colspan="1" %) 588 -((( 589 -Port Anchor Offset 590 590 )))|(% colspan="1" %)(% colspan="1" %) 591 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 601 602 602 ))) 603 603 |((( 604 -Thoroughness 748 +[[Thoroughness>>doc:||anchor="thoroughness"]] 605 605 )))|((( 606 606 de.cau.cs.kieler.klay.layered.thoroughness 607 607 )))|((( ... ... @@ -610,43 +610,159 @@ 610 610 Parents 611 611 )))|((( 612 612 7 757 +)))|(% colspan="1" %)(% colspan="1" %) 758 +((( 759 + 613 613 ))) 614 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 619 = Detailed Documentation = 620 620 621 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 622 623 -== CrossingMinimization==766 +== == 624 624 625 - Crossingminimization determines theorderingofnodesineachlayer,which influencesthenumber ofedgecrossings.This optionswitches between oneofseveral algorithms thatcanbeusedtominimize crossings.Possiblevalues are:768 +{{id name="addUnnecessaryBendpoints"/}}Add Unnecessary BendpointsBy default, KLay Layered tries not to add bendpoints to an edge at positions where the edge doesn't change direction since there's no real bend there. Turning this option on forces such bend points. More specifically, a bend point is added for each edge that spans more than one layer at the point where it crosses a layer. If hierarchy layout is turned on, a bend point is also added whenever the edge crosses a hierarchy boundary. 626 626 627 -* LAYER_SWEEP 770 +== == 771 + 772 +{{id name="contentAlignment"/}}Content AlignmentDetermines how the content of compound nodes is to be aligned if the compound node's size exceeds the bounding box of the content (i.e. child nodes). This might be the case if for a compound node the size constraint of {{code language="none"}}MINIMUM_SIZE{{/code}} is set and the minimum width and height are set large enough. 773 + 774 +{{note}} 775 +This option is not tested for external ports with port constraints {{code language="none"}}FIXED_RATIO{{/code}} or {{code language="none"}}FIXED_POS{{/code}}. 776 +{{/note}} 777 + 778 +== == 779 + 780 +{{id name="crossingMinimization"/}}Crossing MinimizationCrossing 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: 781 + 782 +* {{code language="none"}}LAYER_SWEEP{{/code}} 628 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 784 +* {{code language="none"}}INTERACTIVE{{/code}} 630 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 631 632 -== CycleBreaking==787 +== == 633 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: 789 +{{id name="cycleBreaking"/}}Cycle BreakingKLay 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 635 636 -* GREEDY 791 +* {{code language="none"}}GREEDY{{/code}} 637 637 This algorithm reverses edges greedily. The algorithm tries to avoid edges that have the //Priority// property set. 638 -* INTERACTIVE 793 +* {{code language="none"}}INTERACTIVE{{/code}} 639 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 640 641 -== InteractiveReference Point==796 +== == 642 642 643 - Interactive layering, crossingminimization,and cyclebreakingalgorithmsuse nodepositionstosortnodesintolayersortodeterminetheorderofnodes ineachlayer.However, it isunclearif for examplethetopleft cornersof nodesshouldbecompared,orthebottomleftcorners—differentsettingsmightlead todifferent results.Theinteractivereferencepointdetermineswhichpartof nodesisusedtocompare theirpositions.Itprovidesthe followingsettings:798 +{{id name="direction"/}}DirectionThe layout direction influences where the majority of edges in the final layout will point to. With data flow diagrams, this will usually be to the right. With control flow diagrams, it might be downwards. The layout direction defaults to {{code language="none"}}UNDEFINED{{/code}}. This causes KLay Layered to calculate a layout direction based on the {{code language="none"}}ASPECT_RATIO{{/code}} setting. As of now, if the aspect ratio is >=1 (that is, if the diagram should be wider than it is high), the direction is set to {{code language="none"}}RIGHT{{/code}}. Otherwise, it is set to {{code language="none"}}DOWN{{/code}}. 644 644 645 -* TOP_LEFT 800 +== == 801 + 802 +{{id name="edgeSpacingFactor"/}}Edge Spacing FactorThe 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. 803 + 804 +[[image:attach:edgeSpacingFactor.png]] 805 + 806 +== == 807 + 808 +{{id name="edgeLabelSideSelection"/}}Edge Label Side SelectionDetermines how KLay Layered places edge labels. The following strategies are available: 809 + 810 +* {{code language="none"}}ALWAYS_UP{{/code}} 811 +Always places edge labels above the edge. 812 +* {{code language="none"}}ALWAYS_DOWN{{/code}} 813 +Always places edge labels below the edge. 814 +* {{code language="none"}}DIRECTION_UP{{/code}} 815 +Places edge labels above edges pointing right, and below edges pointing left. 816 +* {{code language="none"}}DIRECTION_DOWN{{/code}} 817 +Places edge labels below edges pointing right, and above edges pointing left. 818 +* {{code language="none"}}SMART{{/code}} 819 +Uses a heuristic that determines the best edge label placement, also taking the placement of port labels into account. 820 + 821 +== == 822 + 823 +{{id name="feedbackEdges"/}}Feedback EdgesFeedback 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. 824 + 825 +With feedback edges: 826 + 827 +[[image:attach:feedback_on.png]] 828 + 829 +Without feedback edges: 830 + 831 +[[image:attach:feedback_off.png]] 832 + 833 +== == 834 + 835 +{{id name="fixedAlignment"/}}Fixed AlignmentThe {{code language="none"}}BRANDES_KOEPF{{/code}} 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. 836 + 837 +This option should usually be left alone. 838 + 839 +== == 840 + 841 +{{id name="interactiveReferencePoint"/}}Interactive Reference PointInteractive 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: 842 + 843 +* {{code language="none"}}TOP_LEFT{{/code}} 646 646 The top left corner of a node is taken as the reference point. 647 -* CENTER 845 +* {{code language="none"}}CENTER{{/code}} 648 648 The center of a node is taken as the reference point. 649 649 650 -== Thoroughness==848 +== == 651 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. 850 +{{id name="layerConstraint"/}}Layer ConstraintThe 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. 851 + 852 +[[image:attach:layer_constraints.png]] 853 + 854 +{{note}} 855 +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. 856 +{{/note}} 857 + 858 +== == 859 + 860 +{{id name="deflectionDampening"/}}Linear Segments Deflection Dampening 861 + 862 +{{note}} 863 +This is a very advanced layout option that you normally shouldn't worry about. 864 +{{/note}} 865 + 866 +The linear segments node placer can sometimes place nodes in a way that results in unnecessarily large diagrams. This option dampens how much the nodes are moved around. A dampening factor of 1.0 disables dampening and just lets the node placer do what it wants. A more conservative dampening factor of 0.3 (the default) restricts the freedom of the node placer a bit more. 867 + 868 +== == 869 + 870 +{{id name="maximalIterations"/}}Maximal IterationsDelimits 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. 871 + 872 +== == 873 + 874 +{{id name="mergeEdges"/}}Merge EdgesIn 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. 875 + 876 +[[image:attach:merging.png]] 877 + 878 +== == 879 + 880 +{{id name="mergeHierarchyEdges"/}}Merge Hierarchy-Crossing EdgesIf 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. 881 + 882 +[[image:attach:merge_hierarchy_edges.png]] 883 + 884 +== == 885 + 886 +{{id name="nodeLayering"/}}Node LayeringDecides which algorithm is used to compute the layer each node is placed in. We have different algorithms available, with different optimization goals: 887 + 888 +* {{code language="none"}}NETWORK_SIMPLEX{{/code}} 889 +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. 890 +* {{code language="none"}}LONGEST_PATH{{/code}} 891 +A very simple algorithm that distributes nodes along their longest path to a sink node. 892 +* {{code language="none"}}INTERACTIVE{{/code}} 893 +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. 894 + 895 +== == 896 + 897 +{{id name="nodePlacement"/}}Node PlacementDecides 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: 898 + 899 +* {{code language="none"}}BRANDES_KOEPF{{/code}} 900 +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. 901 +* {{code language="none"}}LINEAR_SEGMENTS{{/code}} 902 +Computes a balanced placement. 903 +* {{code language="none"}}BUCHHEIM_JUENGER_LEIPERT{{/code}} 904 +Also computes a balanced placement, but a little faster. 905 +* {{code language="none"}}INTERACTIVE{{/code}} 906 +Tries to keep the preset y coordinates of nodes from the original layout. For dummy nodes, a guess is made to infer their coordinates. Requires the other interactive phase implementations to have run as well. 907 +* {{code language="none"}}SIMPLE{{/code}} 908 +Minimizes the area at the expense of... well, pretty much everything else. 909 + 910 +== == 911 + 912 +{{id name="thoroughness"/}}ThoroughnessThere 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.
- Confluence.Code.ConfluencePageClass[0]
-
- Id
-
... ... @@ -1,1 +1,1 @@ 1 - 71111151 +13763270 - URL
-
... ... @@ -1,1 +1,1 @@ 1 -https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/ 7111115/KLay Layered Layout Options1 +https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/13763270/KLay Layered Layout Options