Open
Graph Drawing
Framework

 v. snapshot-2017-02-16
 

OptimalHierarchyClusterLayout.h
Go to the documentation of this file.
1 
33 #pragma once
34 
36 #include <ogdf/basic/tuples.h>
37 
38 
39 namespace ogdf {
40 
41 
43 
82 {
83 public:
86 
89 
90  // destructor
92 
93 
96 
97 
103  double nodeDistance() const {
105  return m_nodeDistance;
106  }
107 
109  void nodeDistance(double x) {
110  if(x >= 0)
111  m_nodeDistance = x;
112  }
113 
115  double layerDistance() const {
116  return m_layerDistance;
117  }
118 
120  void layerDistance(double x) {
121  if(x >= 0)
122  m_layerDistance = x;
123  }
124 
126 
130  bool fixedLayerDistance() const {
131  return m_fixedLayerDistance;
132  }
133 
135  void fixedLayerDistance(bool b) {
136  m_fixedLayerDistance = b;
137  }
138 
140  double weightSegments() const {
141  return m_weightSegments;
142  }
143 
145  void weightSegments(double w) {
146  if(w > 0.0 && w <= 100.0)
147  m_weightSegments = w;
148  }
149 
151  double weightBalancing() const {
152  return m_weightBalancing;
153  }
154 
156  void weightBalancing(double w) {
157  if(w >= 0.0 && w <= 100.0)
158  m_weightBalancing = w;
159  }
160 
162  double weightClusters() const {
163  return m_weightClusters;
164  }
165 
167  void weightClusters(double w) {
168  if(w > 0.0 && w <= 100.0)
169  m_weightClusters = w;
170  }
171 
173 
174 protected:
176  virtual void doCall(const ExtendedNestingGraph& H,ClusterGraphCopyAttributes &ACGC) override;
177 
178 private:
179  void buildLayerList(
180  const LHTreeNode *vNode,
181  List<Tuple2<int,double> > &L);
182 
183  void computeXCoordinates(
184  const ExtendedNestingGraph& H,
186  void computeYCoordinates(
187  const ExtendedNestingGraph& H,
189 
190  // options
191  double m_nodeDistance;
194 
198 
199  // auxiliary data
202 
207 
211 };
212 
213 }
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:39
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.