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
-
... ... @@ -765,63 +765,93 @@ 765 765 766 766 == == 767 767 768 -{{id name="addUnnecessaryBendpoints"/}}Add Unnecessary Bendpoints Bydefault, 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.768 +{{id name="addUnnecessaryBendpoints"/}}Add Unnecessary Bendpoints 769 769 770 - ====770 +By 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. 771 771 772 - {{id name="contentAlignment"/}}Content AlignmentDetermineshow 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.772 +== Content Alignment == 773 773 774 +{{id name="contentAlignment"/}} 775 + 776 + 777 + 778 +Determines 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. 779 + 774 774 {{note}} 775 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 776 {{/note}} 777 777 778 -== == 784 +== Crossing Minimization == 779 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:786 +{{id name="crossingMinimization"/}} 781 781 782 -* {{code language="none"}}LAYER_SWEEP{{/code}} 788 + 789 + 790 +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: 791 + 792 +* LAYER_SWEEP 783 783 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. 784 -* {{code language="none"}}INTERACTIVE{{/code}}794 +* INTERACTIVE 785 785 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. 786 786 787 -== == 797 +== Cycle Breaking == 788 788 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:799 +{{id name="cycleBreaking"/}} 790 790 791 -* {{code language="none"}}GREEDY{{/code}} 801 + 802 + 803 +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: 804 + 805 +* GREEDY 792 792 This algorithm reverses edges greedily. The algorithm tries to avoid edges that have the //Priority// property set. 793 -* {{code language="none"}}INTERACTIVE{{/code}}807 +* INTERACTIVE 794 794 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. 795 795 796 -== == 810 +== Direction == 797 797 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}}.812 +{{id name="direction"/}} 799 799 800 - ====814 + 801 801 802 - {{idname="edgeSpacingFactor"/}}EdgeSpacingFactorTheedgespacingfactor determinesthe amount ofspacebetweenges,relative to theregular //Spacing// value.Theidea is thatwe don'tneed asmuchspacebetween edgesaswedobetweens.816 +The 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}}. 803 803 818 +== Edge Spacing Factor == 819 + 820 +{{id name="edgeSpacingFactor"/}} 821 + 822 + 823 + 824 +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. 825 + 804 804 [[image:attach:edgeSpacingFactor.png]] 805 805 806 -== == 828 +== Edge Label Side Selection == 807 807 808 -{{id name="edgeLabelSideSelection"/}} Edge Label Side SelectionDetermines how KLay Layered places edge labels. The following strategies are available:830 +{{id name="edgeLabelSideSelection"/}} 809 809 810 -* {{code language="none"}}ALWAYS_UP{{/code}} 832 + 833 + 834 +Determines how KLay Layered places edge labels. The following strategies are available: 835 + 836 +* ALWAYS_UP 811 811 Always places edge labels above the edge. 812 -* {{code language="none"}}ALWAYS_DOWN{{/code}}838 +* ALWAYS_DOWN 813 813 Always places edge labels below the edge. 814 -* {{code language="none"}}DIRECTION_UP{{/code}}840 +* DIRECTION_UP 815 815 Places edge labels above edges pointing right, and below edges pointing left. 816 -* {{code language="none"}}DIRECTION_DOWN{{/code}}842 +* DIRECTION_DOWN 817 817 Places edge labels below edges pointing right, and above edges pointing left. 818 -* {{code language="none"}}SMART{{/code}}844 +* SMART 819 819 Uses a heuristic that determines the best edge label placement, also taking the placement of port labels into account. 820 820 821 -== == 847 +== Feedback Edges == 822 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.849 +{{id name="feedbackEdges"/}} 824 824 851 + 852 + 853 +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. 854 + 825 825 With feedback edges: 826 826 827 827 [[image:attach:feedback_on.png]] ... ... @@ -830,25 +830,37 @@ 830 830 831 831 [[image:attach:feedback_off.png]] 832 832 833 -== == 863 +== Fixed Alignment == 834 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.865 +{{id name="fixedAlignment"/}} 836 836 867 + 868 + 869 +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. 870 + 837 837 This option should usually be left alone. 838 838 839 -== == 873 +== Interactive Reference Point == 840 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:875 +{{id name="interactiveReferencePoint"/}} 842 842 843 -* {{code language="none"}}TOP_LEFT{{/code}} 877 + 878 + 879 +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: 880 + 881 +* TOP_LEFT 844 844 The top left corner of a node is taken as the reference point. 845 -* {{code language="none"}}CENTER{{/code}}883 +* CENTER 846 846 The center of a node is taken as the reference point. 847 847 848 -== == 886 +== Layer Constraint == 849 849 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.888 +{{id name="layerConstraint"/}} 851 851 890 + 891 + 892 +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. 893 + 852 852 [[image:attach:layer_constraints.png]] 853 853 854 854 {{note}} ... ... @@ -855,10 +855,12 @@ 855 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 856 {{/note}} 857 857 858 -== == 900 +== Linear Segments Deflection Dampening == 859 859 860 -{{id name="deflectionDampening"/}} Linear Segments Deflection Dampening902 +{{id name="deflectionDampening"/}} 861 861 904 + 905 + 862 862 {{note}} 863 863 This is a very advanced layout option that you normally shouldn't worry about. 864 864 {{/note}} ... ... @@ -865,37 +865,57 @@ 865 865 866 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 867 868 -== == 912 +== Maximal Iterations == 869 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.914 +{{id name="maximalIterations"/}} 871 871 872 - ====916 + 873 873 874 - {{id name="mergeEdges"/}}MergeEdgesIntheKGraphmodel,edgescaneitherconnecttoodesthroughportsordirectly.Inthelattercase,KLayLayered will introduceavirtual port foreachedge,whichresultsin all edgesconnecting to thenodeat differentpoints in the final drawing. If this optionis switchedon, KLayLayered willonlygenerateuptooneinput and one output port for each node. Theoptionisset on a parentnodeandappliesto all ofitschildren,butnotto theparentnodeitself.918 +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. 875 875 920 +== Merge Edges == 921 + 922 +{{id name="mergeEdges"/}} 923 + 924 + 925 + 926 +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. 927 + 876 876 [[image:attach:merging.png]] 877 877 878 -== == 930 +== Merge Hierarchy-Crossing Edges == 879 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.932 +{{id name="mergeHierarchyEdges"/}} 881 881 934 + 935 + 936 +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. 937 + 882 882 [[image:attach:merge_hierarchy_edges.png]] 883 883 884 -== == 940 +== Node Layering == 885 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:942 +{{id name="nodeLayering"/}} 887 887 888 -* {{code language="none"}}NETWORK_SIMPLEX{{/code}} 944 + 945 + 946 +Decides which algorithm is used to compute the layer each node is placed in. We have different algorithms available, with different optimization goals: 947 + 948 +* NETWORK_SIMPLEX 889 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}}950 +* LONGEST_PATH 891 891 A very simple algorithm that distributes nodes along their longest path to a sink node. 892 -* {{code language="none"}}INTERACTIVE{{/code}}952 +* INTERACTIVE 893 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 894 895 -== == 955 +== Node Placement == 896 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:957 +{{id name="nodePlacement"/}} 898 898 959 + 960 + 961 +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: 962 + 899 899 * {{code language="none"}}BRANDES_KOEPF{{/code}} 900 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 901 * {{code language="none"}}LINEAR_SEGMENTS{{/code}} ... ... @@ -907,6 +907,10 @@ 907 907 * {{code language="none"}}SIMPLE{{/code}} 908 908 Minimizes the area at the expense of... well, pretty much everything else. 909 909 910 -== == 974 +== Thoroughness == 911 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. 976 +{{id name="thoroughness"/}} 977 + 978 + 979 + 980 +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.
- Confluence.Code.ConfluencePageClass[0]
-
- Id
-
... ... @@ -1,1 +1,1 @@ 1 -1 22885271 +10751227 - URL
-
... ... @@ -1,1 +1,1 @@ 1 -https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/1 2288527/KLay Layered Layout Options1 +https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/10751227/KLay Layered Layout Options