Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
OptimalHierarchyClusterLayout.h
Go to the documentation of this file.
1
33#pragma once
34
35#include <ogdf/basic/tuples.h>
37
38namespace ogdf {
39
40
42
81public:
84
87
88 // destructor
90
93
100 double nodeDistance() const { return m_nodeDistance; }
101
103 void nodeDistance(double x) {
104 if (x >= 0) {
105 m_nodeDistance = x;
106 }
107 }
108
110 double layerDistance() const { return m_layerDistance; }
111
113 void layerDistance(double x) {
114 if (x >= 0) {
115 m_layerDistance = x;
116 }
117 }
118
120
124 bool fixedLayerDistance() const { return m_fixedLayerDistance; }
125
127 void fixedLayerDistance(bool b) { m_fixedLayerDistance = b; }
128
130 double weightSegments() const { return m_weightSegments; }
131
133 void weightSegments(double w) {
134 if (w > 0.0 && w <= 100.0) {
135 m_weightSegments = w;
136 }
137 }
138
140 double weightBalancing() const { return m_weightBalancing; }
141
143 void weightBalancing(double w) {
144 if (w >= 0.0 && w <= 100.0) {
145 m_weightBalancing = w;
146 }
147 }
148
150 double weightClusters() const { return m_weightClusters; }
151
153 void weightClusters(double w) {
154 if (w > 0.0 && w <= 100.0) {
155 m_weightClusters = w;
156 }
157 }
158
160
161protected:
164
165private:
167
170
171 // options
175
179
180 // auxiliary data
183
188
192};
193
194}
Declaration of interface for hierarchy layout algorithms (3.
Dynamic arrays indexed with clusters.
Manages access on copy of an attributed clustered graph.
Interface of hierarchy layout algorithms for cluster graphs.
Doubly linked lists (maintaining the length of the list).
Definition List.h:1435
Dynamic arrays indexed with nodes.
Definition NodeArray.h:125
The LP-based hierarchy cluster layout algorithm.
virtual void doCall(const ExtendedNestingGraph &H, ClusterGraphCopyAttributes &ACGC) override
Implements the algorithm call.
double m_weightClusters
The weight for cluster boundary variables.
void weightClusters(double w)
Sets the weight for cluster boundary variables to w.
double layerDistance() const
Returns the minimal allowed y-distance between layers.
OptimalHierarchyClusterLayout()
Creates an instance of optimal hierarchy layout for clusters.
double m_nodeDistance
The minimal distance between nodes.
bool fixedLayerDistance() const
Returns the current setting of option fixedLayerDistance.
void computeXCoordinates(const ExtendedNestingGraph &H, ClusterGraphCopyAttributes &AGC)
void buildLayerList(const LHTreeNode *vNode, List< Tuple2< int, double > > &L)
void weightSegments(double w)
Sets the weight of edge segments connecting to vertical segments to w.
void fixedLayerDistance(bool b)
Sets the option fixedLayerDistance to b.
double weightSegments() const
Returns the weight of edge segments connecting to vertical segments.
bool m_fixedLayerDistance
Use fixed layer distances?
void computeYCoordinates(const ExtendedNestingGraph &H, ClusterGraphCopyAttributes &AGC)
double weightBalancing() const
Returns the weight for balancing successors below a node; 0.0 means no balancing.
void layerDistance(double x)
Sets the minimal allowed y-distance between layers to x.
void weightBalancing(double w)
Sets the weight for balancing successors below a node to w; 0.0 means no balancing.
double m_weightSegments
The weight of edge segments.
OptimalHierarchyClusterLayout & operator=(const OptimalHierarchyClusterLayout &)
Assignment operator.
double m_weightBalancing
The weight for balancing.
double weightClusters() const
Returns the weight for cluster boundary variables.
OptimalHierarchyClusterLayout(const OptimalHierarchyClusterLayout &)
Copy constructor.
double nodeDistance() const
Returns the minimal allowed x-distance between nodes on a layer.
double m_layerDistance
The minimal distance between layers.
void nodeDistance(double x)
Sets the minimal allowed x-distance between nodes on a layer to x.
Tuples of two elements (2-tuples).
Definition tuples.h:46
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition config.h:101
static MultilevelBuilder * getDoubleFactoredZeroAdjustedMerger()
The namespace for all OGDF objects.
Declaration and implementation of class Tuple2, Tuple3 and Tuple4.