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/Graph.h>
36#include <ogdf/basic/basic.h>
39
40namespace ogdf {
41class ClusterGraphCopyAttributes;
42class ExtendedNestingGraph;
43class LHTreeNode;
44template<class E1, class E2>
45class Tuple2;
46template<class E>
47class List;
48
50
89public:
92
95
96 // destructor
98
101
108 double nodeDistance() const { return m_nodeDistance; }
109
111 void nodeDistance(double x) {
112 if (x >= 0) {
113 m_nodeDistance = x;
114 }
115 }
116
118 double layerDistance() const { return m_layerDistance; }
119
121 void layerDistance(double x) {
122 if (x >= 0) {
123 m_layerDistance = x;
124 }
125 }
126
128
132 bool fixedLayerDistance() const { return m_fixedLayerDistance; }
133
135 void fixedLayerDistance(bool b) { m_fixedLayerDistance = b; }
136
138 double weightSegments() const { return m_weightSegments; }
139
141 void weightSegments(double w) {
142 if (w > 0.0 && w <= 100.0) {
143 m_weightSegments = w;
144 }
145 }
146
148 double weightBalancing() const { return m_weightBalancing; }
149
151 void weightBalancing(double w) {
152 if (w >= 0.0 && w <= 100.0) {
153 m_weightBalancing = w;
154 }
155 }
156
158 double weightClusters() const { return m_weightClusters; }
159
161 void weightClusters(double w) {
162 if (w > 0.0 && w <= 100.0) {
163 m_weightClusters = w;
164 }
165 }
166
168
169protected:
171 virtual void doCall(const ExtendedNestingGraph& H, ClusterGraphCopyAttributes& ACGC) override;
172
173private:
175
178
179 // options
183
187
188 // auxiliary data
191
196
200};
201
202}
Derived class of GraphObserver providing additional functionality to handle clustered graphs.
Includes declaration of graph class.
Declaration of interface for hierarchy layout algorithms (3.
Basic declarations, included by all source files.
RegisteredArray for labeling the clusters of a ClusterGraph.
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:1451
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:49
RegisteredArray for nodes, edges and adjEntries of a graph.
Definition Graph_d.h:659
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF dynamic library (shared object / DLL),...
Definition config.h:117
The namespace for all OGDF objects.