Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
FastSimpleHierarchyLayout.h
Go to the documentation of this file.
1
33#pragma once
34
38
39namespace ogdf {
40
87private:
88 double m_minXSep;
89 double m_ySep;
93
94protected:
95 virtual void doCall(const HierarchyLevelsBase& levels, GraphAttributes& AGC) override;
96
97public:
99
105
106
109
110 // destructor
112
115
117 double nodeDistance() const { return m_minXSep; }
118
120 void nodeDistance(double dist) { m_minXSep = dist; }
121
123 double layerDistance() const { return m_ySep; }
124
126 void layerDistance(double dist) { m_ySep = dist; }
127
129 bool downward() const { return m_downward; }
130
132 void downward(bool d) { m_downward = d; }
133
135 bool leftToRight() const { return m_leftToRight; }
136
138 void leftToRight(bool b) { m_leftToRight = b; }
139
141 bool balanced() const { return m_balanced; }
142
144 void balanced(bool b) { m_balanced = b; }
145
146
147private:
158 void markType1Conflicts(const HierarchyLevelsBase& levels, bool downward,
160
174 const bool downward, const bool leftToRight);
175
187
201 const bool leftToRight, bool downward);
202
217 const NodeArray<node>& align, const HierarchyLevelsBase& levels,
218 const NodeArray<double>& blockWidth, const NodeArray<node>& root, const bool leftToRight);
219
227 const HierarchyLevelsBase::TraversingDir dir) const;
228
237 node pred(const node v, const HierarchyLevelsBase& levels, const bool leftToRight);
238};
239
240}
Declaration of Hierarchy class.
Declaration of interface hierarchy layout algorithms (3.
Declaration and implementation of NodeArray class.
Coordinate assignment phase for the Sugiyama algorithm by Ulrik Brandes and Boris Köpf.
void computeBlockWidths(const GraphCopy &GC, const GraphAttributes &GCA, NodeArray< node > &root, NodeArray< double > &blockWidth)
Computes the width of each block, i.e., the maximal width of a node in the block, and stores it in bl...
double m_minXSep
stores the option node distance.
void verticalAlignment(const HierarchyLevelsBase &levels, NodeArray< node > &root, NodeArray< node > &align, const NodeArray< NodeArray< bool > > &type1Conflicts, const bool downward, const bool leftToRight)
Align each node to a node on the next higher level.
void markType1Conflicts(const HierarchyLevelsBase &levels, bool downward, NodeArray< NodeArray< bool > > &type1Conflicts)
Preprocessing step to find all type1 conflicts.
void leftToRight(bool b)
Sets the option left-to-right to b.
node pred(const node v, const HierarchyLevelsBase &levels, const bool leftToRight)
Predecessor of v on the same level,.
void placeBlock(node v, NodeArray< node > &sink, NodeArray< double > &shift, NodeArray< double > &x, const NodeArray< node > &align, const HierarchyLevelsBase &levels, const NodeArray< double > &blockWidth, const NodeArray< node > &root, const bool leftToRight)
Calculate the coordinate for root nodes (placing)
double layerDistance() const
Returns the option layer distance.
double nodeDistance() const
Returns the option node distance.
void horizontalCompactation(const NodeArray< node > &align, const HierarchyLevelsBase &levels, const NodeArray< node > &root, const NodeArray< double > &blockWidth, NodeArray< double > &x, const bool leftToRight, bool downward)
Calculate the coordinates for each node.
virtual void doCall(const HierarchyLevelsBase &levels, GraphAttributes &AGC) override
Implements the actual algorithm call.
node virtualTwinNode(const HierarchyLevelsBase &levels, const node v, const HierarchyLevelsBase::TraversingDir dir) const
The twin of an inner Segment.
void balanced(bool b)
Sets the option balanced to b.
FastSimpleHierarchyLayout & operator=(const FastSimpleHierarchyLayout &)
Assignment operator.
bool balanced() const
Returns the option balanced.
bool m_leftToRight
stores the option left-to-right.
FastSimpleHierarchyLayout()
Creates an instance of fast simple hierarchy layout.
void layerDistance(double dist)
Sets the option layer distance to dist.
void downward(bool d)
Sets the option downward to d.
bool leftToRight() const
Returns the option left-to-right.
FastSimpleHierarchyLayout(const FastSimpleHierarchyLayout &)
Copy constructor.
bool m_balanced
stores the option balanced.
void nodeDistance(double dist)
Sets the option node distance to dist.
bool m_downward
stores the option downward.
bool downward() const
Returns the option downward.
double m_ySep
stores the option layer distance.
Stores additional attributes of a graph (like layout information).
Copies of graphs supporting edge splitting.
Definition GraphCopy.h:254
Interface of hierarchy layout algorithms.
Dynamic arrays indexed with nodes.
Definition NodeArray.h:125
Class for the representation of nodes.
Definition Graph_d.h:177
#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.