Open
Graph Drawing
Framework

 v. 2020.02 (Catalpa)
 

OptimalHierarchyClusterLayout.h
Go to the documentation of this file.
1 
33 #pragma once
34 
36 #include <ogdf/basic/tuples.h>
37 
38 namespace ogdf {
39 
40 
42 
81 {
82 public:
85 
88 
89  // destructor
91 
92 
95 
96 
102  double nodeDistance() const {
104  return m_nodeDistance;
105  }
106 
108  void nodeDistance(double x) {
109  if(x >= 0)
110  m_nodeDistance = x;
111  }
112 
114  double layerDistance() const {
115  return m_layerDistance;
116  }
117 
119  void layerDistance(double x) {
120  if(x >= 0)
121  m_layerDistance = x;
122  }
123 
125 
129  bool fixedLayerDistance() const {
130  return m_fixedLayerDistance;
131  }
132 
134  void fixedLayerDistance(bool b) {
135  m_fixedLayerDistance = b;
136  }
137 
139  double weightSegments() const {
140  return m_weightSegments;
141  }
142 
144  void weightSegments(double w) {
145  if(w > 0.0 && w <= 100.0)
146  m_weightSegments = w;
147  }
148 
150  double weightBalancing() const {
151  return m_weightBalancing;
152  }
153 
155  void weightBalancing(double w) {
156  if(w >= 0.0 && w <= 100.0)
157  m_weightBalancing = w;
158  }
159 
161  double weightClusters() const {
162  return m_weightClusters;
163  }
164 
166  void weightClusters(double w) {
167  if(w > 0.0 && w <= 100.0)
168  m_weightClusters = w;
169  }
170 
172 
173 protected:
175  virtual void doCall(const ExtendedNestingGraph& H,ClusterGraphCopyAttributes &ACGC) override;
176 
177 private:
178  void buildLayerList(
179  const LHTreeNode *vNode,
180  List<Tuple2<int,double> > &L);
181 
182  void computeXCoordinates(
183  const ExtendedNestingGraph& H,
185  void computeYCoordinates(
186  const ExtendedNestingGraph& H,
188 
189  // options
190  double m_nodeDistance;
193 
197 
198  // auxiliary data
201 
206 
210 };
211 
212 }
Manages access on copy of an attributed clustered graph.
bool fixedLayerDistance() const
Returns the current setting of option fixedLayerDistance.
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:99
double m_layerDistance
The minimal distance between layers.
bool m_fixedLayerDistance
Use fixed layer distances?
void weightSegments(double w)
Sets the weight of edge segments connecting to vertical segments to w.
void nodeDistance(double x)
Sets the minimal allowed x-distance between nodes on a layer to x.
double weightClusters() const
Returns the weight for cluster boundary variables.
Interface of hierarchy layout algorithms for cluster graphs.
Tuples of two elements (2-tuples).
Definition: tuples.h:46
Doubly linked lists (maintaining the length of the list).
Definition: List.h:40
double m_weightSegments
The weight of edge segments.
void weightClusters(double w)
Sets the weight for cluster boundary variables to w.
double weightSegments() const
Returns the weight of edge segments connecting to vertical segments.
Declaration of interface for hierarchy layout algorithms (3.
Declaration and implementation of class Tuple2, Tuple3 and Tuple4.
double m_weightBalancing
The weight for balancing.
double weightBalancing() const
Returns the weight for balancing successors below a node; 0.0 means no balancing. ...
void weightBalancing(double w)
Sets the weight for balancing successors below a node to w; 0.0 means no balancing.
void fixedLayerDistance(bool b)
Sets the option fixedLayerDistance to b.
double layerDistance() const
Returns the minimal allowed y-distance between layers.
The namespace for all OGDF objects.
double m_weightClusters
The weight for cluster boundary variables.
double m_nodeDistance
The minimal distance between nodes.
void layerDistance(double x)
Sets the minimal allowed y-distance between layers to x.
The LP-based hierarchy cluster layout algorithm.