Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
VisibilityLayout.h
Go to the documentation of this file.
1
32//***
33// Visibility Layout Method. see "Graph Drawing" by Di Battista et al.
34//***
35
36#pragma once
37
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
57 virtual void call(GraphAttributes& GA) override;
58
60
64
65 void setMinGridDistance(int dist) { m_grid_dist = dist; }
66
67
68private:
69 //min grid distance
71
72 //node segment of the visibility representation
73 struct NodeSegment {
74 int y; //y coordinate
75 int x_l; // left x coordinate
76 int x_r; // right x coordiante
77 };
78
79 // edge segment of the visibility representation
80 struct EdgeSegment {
81 int y_b; // bottom y coordinate
82 int y_t; // top y coordinate
83 int x; // x coordiante
84 };
85
86 //mapping node to node segment of visibility presentation
88
89 //mapping edge to edge segment of visibility presentation
91
92 std::unique_ptr<UpwardPlanarizerModule> m_upPlanarizer; // upward planarizer
93
98
100};
101
102}
declaration and implementation of FaceArray class
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.
Dynamic arrays indexed with edges.
Definition EdgeArray.h:125
Dynamic arrays indexed with faces of a combinatorial embedding.
Definition FaceArray.h:126
Stores additional attributes of a graph (like layout information).
Data type for general directed graphs (adjacency list representation).
Definition Graph_d.h:521
Interface of general layout algorithms.
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.
virtual void call(GraphAttributes &GA) override
Computes a layout of graph GA.
std::unique_ptr< UpwardPlanarizerModule > m_upPlanarizer
void constructVisibilityRepresentation(const UpwardPlanRep &UPR)
void setUpwardPlanarizer(UpwardPlanarizerModule *upPlanarizer)
void setMinGridDistance(int dist)
EdgeArray< EdgeSegment > edgeToVis
void constructDualGraph(const UpwardPlanRep &UPR, Graph &D, node &s_D, node &t_D, FaceArray< node > &faceToNode, NodeArray< face > &leftFace_node, NodeArray< face > &rightFace_node, EdgeArray< face > &leftFace_edge, EdgeArray< face > &rightFace_edge)
NodeArray< NodeSegment > nodeToVis
void layout(GraphAttributes &GA, const UpwardPlanRep &UPROrig)
#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.