Adaptagrams
opts.h
1 /*
2  * vim: ts=4 sw=4 et tw=0 wm=0
3  *
4  * libdialect - A library for computing DiAlEcT layouts:
5  * D = Decompose/Distribute
6  * A = Arrange
7  * E = Expand/Emend
8  * T = Transform
9  *
10  * Copyright (C) 2018 Monash University
11  *
12  * This library is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU Lesser General Public
14  * License as published by the Free Software Foundation; either
15  * version 2.1 of the License, or (at your option) any later version.
16  * See the file LICENSE.LGPL distributed with the library.
17  *
18  * This library is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
21  *
22  * Author(s): Steve Kieffer <http://skieffer.info>
23 */
24 
25 #ifndef DIALECT_OPTS_H
26 #define DIALECT_OPTS_H
27 
28 #include "libdialect/ortho.h"
29 
30 namespace dialect {
31 
32 enum class AspectRatioClass {
33  NONE, PORTRAIT, LANDSCAPE
34 };
35 
50 enum class TreeRoutingType {
51  STRICT,
52  CORE_ATTACHMENT,
53  MONOTONIC
54 };
55 
63  SPACE,
64  CONSTRAINTS
65 };
66 
67 struct HolaOpts {
68 
70 
72  CardinalDir defaultTreeGrowthDir = CardinalDir::SOUTH;
75  double treeLayoutScalar_nodeSep = 0.25;
77  double treeLayoutScalar_rankSep = 1.0;
80  bool preferConvexTrees = true;
82  TreeRoutingType peeledTreeRouting = TreeRoutingType::CORE_ATTACHMENT;
84  TreeRoutingType wholeTreeRouting = TreeRoutingType::MONOTONIC;
85 
91 
93 
96  bool orthoHubAvoidFlatTriangles = true;
97 
99 
107  bool useACAforLinks = true;
108 
110 
114  double routingScalar_crossingPenalty = 2;
115  double routingScalar_segmentPenalty = 0.5;
116 
117 
119 
121  bool treePlacement_favourCardinal = true;
123  bool treePlacement_favourExternal = true;
126  bool treePlacement_favourIsolation = true;
127 
128 
130 
135  bool expansion_doCostlierDimensionFirst = false;
136  ExpansionEstimateMethod expansion_estimateMethod = ExpansionEstimateMethod::CONSTRAINTS;
137 
138 
140 
142  bool do_near_align = true;
144  unsigned align_reps = 2;
145 
148 
150  double nearAlignScalar_kinkWidth = 0.25;
152  double nearAlignScalar_scope = 1.0;
153 
154 
156 
159  double nodePaddingScalar = 0.25;
160 
161 
163 
166  AspectRatioClass preferredAspectRatio = AspectRatioClass::LANDSCAPE;
170  CardinalDir preferredTreeGrowthDir = CardinalDir::SOUTH;
173  bool putUlcAtOrigin = true;
174 
175 };
176 
177 
178 } // namespace dialect
179 
180 #endif // DIALECT_OPTS_H
libdialect: A library for computing human-like orthogonal network (DiAlEcT) layouts.
Definition: cola.h:44
No constraint:
ExpansionEstimateMethod
Definition: opts.h:62
TreeRoutingType
Definition: opts.h:50