Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
OptimalHierarchyLayout.h
Go to the documentation of this file.
1
33#pragma once
34
36
37namespace ogdf {
38
39
41
77public:
80
83
84 // destructor
86
89
96 double nodeDistance() const { return m_nodeDistance; }
97
99 void nodeDistance(double x) {
100 if (x >= 0) {
101 m_nodeDistance = x;
102 }
103 }
104
106 double layerDistance() const { return m_layerDistance; }
107
109 void layerDistance(double x) {
110 if (x >= 0) {
111 m_layerDistance = x;
112 }
113 }
114
116
120 bool fixedLayerDistance() const { return m_fixedLayerDistance; }
121
123 void fixedLayerDistance(bool b) { m_fixedLayerDistance = b; }
124
126 double weightSegments() const { return m_weightSegments; }
127
129 void weightSegments(double w) {
130 if (w > 0.0 && w <= 100.0) {
131 m_weightSegments = w;
132 }
133 }
134
136 double weightBalancing() const { return m_weightBalancing; }
137
139 void weightBalancing(double w) {
140 if (w >= 0.0 && w <= 100.0) {
141 m_weightBalancing = w;
142 }
143 }
144
146
147protected:
149 virtual void doCall(const HierarchyLevelsBase& levels, GraphAttributes& AGC) override;
150
151private:
154
155 // options
159
162};
163
164}
Declaration of interface hierarchy layout algorithms (3.
Stores additional attributes of a graph (like layout information).
Interface of hierarchy layout algorithms.
The LP-based hierarchy layout algorithm.
void weightBalancing(double w)
Sets the weight for balancing successors below a node to w; 0.0 means no balancing.
OptimalHierarchyLayout & operator=(const OptimalHierarchyLayout &)
Assignment operator.
bool m_fixedLayerDistance
Use fixed layer distances?
bool fixedLayerDistance() const
Returns the current setting of option fixedLayerDistance.
void computeYCoordinates(const HierarchyLevelsBase &levels, GraphAttributes &AGC)
double weightSegments() const
Returns the weight of edge segments connecting to vertical segments.
double m_nodeDistance
The minimal distance between nodes.
void layerDistance(double x)
Sets the minimal allowed y-distance between layers to x.
double layerDistance() const
Returns the minimal allowed y-distance between layers.
double m_weightBalancing
The weight for balancing.
OptimalHierarchyLayout(const OptimalHierarchyLayout &)
Copy constructor.
OptimalHierarchyLayout()
Creates an instance of optimal hierarchy layout.
void fixedLayerDistance(bool b)
Sets the option fixedLayerDistance to b.
double m_layerDistance
The minimal distance between layers.
void weightSegments(double w)
Sets the weight of edge segments connecting to vertical segments to w.
double weightBalancing() const
Returns the weight for balancing successors below a node; 0.0 means no balancing.
virtual void doCall(const HierarchyLevelsBase &levels, GraphAttributes &AGC) override
Implements the algorithm call.
double nodeDistance() const
Returns the minimal allowed x-distance between nodes on a layer.
void nodeDistance(double x)
Sets the minimal allowed x-distance between nodes on a layer to x.
double m_weightSegments
The weight of edge segments.
void computeXCoordinates(const HierarchyLevelsBase &levels, GraphAttributes &AGC)
#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.