Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
DominanceLayout.h
Go to the documentation of this file.
1
32//***
33// Dominance Drawing Method. see "Graph Drawing" by Di Battista et al.
34//***
35
36#pragma once
37
40#include <ogdf/basic/Math.h>
44
45#include <memory>
46
47namespace ogdf {
48
50public:
52 m_grid_dist = 1;
53 // set default module
54 m_upPlanarizer.reset(new SubgraphUpwardPlanarizer());
55
56 m_angle = Math::degreesToRadians(45.0);
57 }
58
59 virtual void call(GraphAttributes& GA) override;
60
62
66
67 void setMinGridDistance(int dist) { m_grid_dist = dist; }
68
69
70private:
71 double m_angle; //rotate angle to obtain an upward drawing; default is 45°
72
77
78 int m_R;
79 int m_L;
80
81 // list of nodes sorted by their x and y coordinate.
84
85 //coordinate in preliminary layout
88
89 //final coordinate of the nodes of the UPR
92
93
94 //min grid distance
96
97 std::unique_ptr<UpwardPlanarizerModule> m_upPlanarizer; // upward planarizer
98
99 void labelX(const UpwardPlanRep& UPR, node v, int& count);
100
101 void labelY(const UpwardPlanRep& UPR, node v, int& count);
102
104
106};
107
108}
Declaration of class GraphAttributes which extends a Graph by additional attributes.
Declaration of interface for layout algorithms (class LayoutModule)
Declaration of class SubgraphUpwardPlanarizer.
Declaration of a base class for planar representations of graphs and cluster graphs.
Declaration of UpwardPlanarizer Module, an interface for upward planarization algorithms.
Mathematical Helpers.
NodeArray< edge > lastout
NodeArray< edge > lastin
NodeArray< int > yPreCoord
std::unique_ptr< UpwardPlanarizerModule > m_upPlanarizer
void labelX(const UpwardPlanRep &UPR, node v, int &count)
NodeArray< edge > firstout
virtual void call(GraphAttributes &GA) override
Computes a layout of graph GA.
void compact(const UpwardPlanRep &UPR, GraphAttributes &GA)
NodeArray< int > xPreCoord
NodeArray< int > yCoord
void setUpwardPlanarizer(UpwardPlanarizerModule *upPlanarizer)
NodeArray< edge > firstin
void layout(GraphAttributes &GA, const UpwardPlanRep &UPROrig)
void setMinGridDistance(int dist)
void labelY(const UpwardPlanRep &UPR, node v, int &count)
NodeArray< int > xCoord
void findTransitiveEdges(const UpwardPlanRep &UPR, List< edge > &edges)
Stores additional attributes of a graph (like layout information).
Interface of general layout algorithms.
Doubly linked lists (maintaining the length of the list).
Definition List.h:1435
Dynamic arrays indexed with nodes.
Definition NodeArray.h:125
Class for the representation of nodes.
Definition Graph_d.h:177
Takes an acyclic connected non-upward-planar graph and planarizes it, i.e., we obtain an upward-plana...
Upward planarized representations (of a connected component) of a graph.
Interface for upward planarization algorithms.
#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.