Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

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 
40 namespace ogdf {
41 class ClusterGraphCopyAttributes;
42 class ExtendedNestingGraph;
43 class LHTreeNode;
44 template<class E1, class E2>
45 class Tuple2;
46 template<class E>
47 class List;
48 
50 
89 public:
92 
95 
96  // destructor
98 
101 
107  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 
169 protected:
171  virtual void doCall(const ExtendedNestingGraph& H, ClusterGraphCopyAttributes& ACGC) override;
172 
173 private:
174  void buildLayerList(const LHTreeNode* vNode, List<Tuple2<int, double>>& L);
175 
176  void computeXCoordinates(const ExtendedNestingGraph& H, ClusterGraphCopyAttributes& AGC);
177  void computeYCoordinates(const ExtendedNestingGraph& H, ClusterGraphCopyAttributes& AGC);
178 
179  // options
180  double m_nodeDistance;
183 
187 
188  // auxiliary data
191 
196 
200 };
201 
202 }
ogdf::OptimalHierarchyClusterLayout::fixedLayerDistance
bool fixedLayerDistance() const
Returns the current setting of option fixedLayerDistance.
Definition: OptimalHierarchyClusterLayout.h:132
ogdf
The namespace for all OGDF objects.
Definition: multilevelmixer.cpp:39
Graph.h
Includes declaration of graph class.
ogdf::OptimalHierarchyClusterLayout::weightSegments
void weightSegments(double w)
Sets the weight of edge segments connecting to vertical segments to w.
Definition: OptimalHierarchyClusterLayout.h:141
ogdf::OptimalHierarchyClusterLayout::m_fixedLayerDistance
bool m_fixedLayerDistance
Use fixed layer distances?
Definition: OptimalHierarchyClusterLayout.h:182
ogdf::Tuple2
Tuples of two elements (2-tuples).
Definition: tuples.h:49
ogdf::OptimalHierarchyClusterLayout::m_isVirtual
NodeArray< bool > m_isVirtual
Definition: OptimalHierarchyClusterLayout.h:197
ogdf::OptimalHierarchyClusterLayout::weightClusters
double weightClusters() const
Returns the weight for cluster boundary variables.
Definition: OptimalHierarchyClusterLayout.h:158
ogdf::ClusterArrayBase
RegisteredArray for labeling the clusters of a ClusterGraph.
Definition: ClusterGraph.h:311
ogdf::OptimalHierarchyClusterLayout::weightSegments
double weightSegments() const
Returns the weight of edge segments connecting to vertical segments.
Definition: OptimalHierarchyClusterLayout.h:138
ogdf::OptimalHierarchyClusterLayout::weightClusters
void weightClusters(double w)
Sets the weight for cluster boundary variables to w.
Definition: OptimalHierarchyClusterLayout.h:161
ogdf::HierarchyClusterLayoutModule
Interface of hierarchy layout algorithms for cluster graphs.
Definition: HierarchyClusterLayoutModule.h:48
ogdf::LHTreeNode
Definition: ExtendedNestingGraph.h:115
ogdf::OptimalHierarchyClusterLayout::fixedLayerDistance
void fixedLayerDistance(bool b)
Sets the option fixedLayerDistance to b.
Definition: OptimalHierarchyClusterLayout.h:135
ogdf::OptimalHierarchyClusterLayout::m_weightSegments
double m_weightSegments
The weight of edge segments.
Definition: OptimalHierarchyClusterLayout.h:184
ogdf::OptimalHierarchyClusterLayout::m_layerDistance
double m_layerDistance
The minimal distance between layers.
Definition: OptimalHierarchyClusterLayout.h:181
ogdf::OptimalHierarchyClusterLayout::layerDistance
double layerDistance() const
Returns the minimal allowed y-distance between layers.
Definition: OptimalHierarchyClusterLayout.h:118
ogdf::OptimalHierarchyClusterLayout::m_nodeDistance
double m_nodeDistance
The minimal distance between nodes.
Definition: OptimalHierarchyClusterLayout.h:180
ogdf::OptimalHierarchyClusterLayout::m_segmentOffset
int m_segmentOffset
Definition: OptimalHierarchyClusterLayout.h:193
ogdf::OptimalHierarchyClusterLayout::nodeDistance
void nodeDistance(double x)
Sets the minimal allowed x-distance between nodes on a layer to x.
Definition: OptimalHierarchyClusterLayout.h:111
ogdf::OptimalHierarchyClusterLayout::m_vIndex
NodeArray< int > m_vIndex
Definition: OptimalHierarchyClusterLayout.h:198
ogdf::OptimalHierarchyClusterLayout::weightBalancing
void weightBalancing(double w)
Sets the weight for balancing successors below a node to w; 0.0 means no balancing.
Definition: OptimalHierarchyClusterLayout.h:151
ogdf::OptimalHierarchyClusterLayout::~OptimalHierarchyClusterLayout
~OptimalHierarchyClusterLayout()
Definition: OptimalHierarchyClusterLayout.h:97
ogdf::OptimalHierarchyClusterLayout::m_weightBalancing
double m_weightBalancing
The weight for balancing.
Definition: OptimalHierarchyClusterLayout.h:185
HierarchyClusterLayoutModule.h
Declaration of interface for hierarchy layout algorithms (3. phase of Sugiyama) for cluster graphs.
ogdf::ClusterGraphCopyAttributes
Manages access on copy of an attributed clustered graph.
Definition: ClusterGraphCopyAttributes.h:48
ogdf::List
Doubly linked lists (maintaining the length of the list).
Definition: DfsMakeBiconnected.h:40
ogdf::internal::GraphRegisteredArray
RegisteredArray for nodes, edges and adjEntries of a graph.
Definition: Graph_d.h:658
ogdf::OptimalHierarchyClusterLayout::layerDistance
void layerDistance(double x)
Sets the minimal allowed y-distance between layers to x.
Definition: OptimalHierarchyClusterLayout.h:121
ogdf::OptimalHierarchyClusterLayout::m_clusterLeftOffset
int m_clusterLeftOffset
Definition: OptimalHierarchyClusterLayout.h:194
basic.h
Basic declarations, included by all source files.
OGDF_EXPORT
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:101
ogdf::OptimalHierarchyClusterLayout::m_weightClusters
double m_weightClusters
The weight for cluster boundary variables.
Definition: OptimalHierarchyClusterLayout.h:186
ogdf::OptimalHierarchyClusterLayout::m_vertexOffset
int m_vertexOffset
Definition: OptimalHierarchyClusterLayout.h:192
ClusterGraph.h
Derived class of GraphObserver providing additional functionality to handle clustered graphs.
ogdf::OptimalHierarchyClusterLayout::weightBalancing
double weightBalancing() const
Returns the weight for balancing successors below a node; 0.0 means no balancing.
Definition: OptimalHierarchyClusterLayout.h:148
ogdf::ExtendedNestingGraph
Definition: ExtendedNestingGraph.h:302
ogdf::OptimalHierarchyClusterLayout::m_pACGC
ClusterGraphCopyAttributes * m_pACGC
Definition: OptimalHierarchyClusterLayout.h:189
ogdf::OptimalHierarchyClusterLayout
The LP-based hierarchy cluster layout algorithm.
Definition: OptimalHierarchyClusterLayout.h:88
ogdf::OptimalHierarchyClusterLayout::m_cIndex
ClusterArray< int > m_cIndex
Definition: OptimalHierarchyClusterLayout.h:199
ogdf::OptimalHierarchyClusterLayout::m_clusterRightOffset
int m_clusterRightOffset
Definition: OptimalHierarchyClusterLayout.h:195
ogdf::OptimalHierarchyClusterLayout::m_pH
const ExtendedNestingGraph * m_pH
Definition: OptimalHierarchyClusterLayout.h:190