Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

PlanarizationLayout.h
Go to the documentation of this file.
1 
32 #pragma once
33 
34 #include <ogdf/basic/Array.h>
35 #include <ogdf/basic/Graph.h>
37 #include <ogdf/basic/basic.h>
38 #include <ogdf/basic/geometry.h>
44 
45 #include <algorithm>
46 #include <memory>
47 
48 namespace ogdf {
49 class GraphAttributes;
50 class Layout;
51 class PlanRep;
52 template<class E>
53 class List;
54 
56 
60 public:
63 
66 
69 
73  void call(GraphAttributes& ga) override;
74 
76 
82  void call(GraphAttributes& ga, Graph& g);
83 
84  void callSimDraw(GraphAttributes& ga);
85 
91 
96  double pageRatio() const { return m_pageRatio; }
97 
99  void pageRatio(double ratio) { m_pageRatio = ratio; }
100 
102 
106  int minCliqueSize() const { return m_cliqueSize; }
107 
109  void minCliqueSize(int i) { m_cliqueSize = max(i, 3); }
110 
116  void setCrossMin(CrossingMinimizationModule* pCrossMin) { m_crossMin.reset(pCrossMin); }
118 
120 
125  void setEmbedder(EmbedderModule* pEmbedder) { m_embedder.reset(pEmbedder); }
126 
128 
136  void setPlanarLayouter(LayoutPlanRepModule* pPlanarLayouter) {
137  m_planarLayouter.reset(pPlanarLayouter);
138  }
139 
141 
146  void setPacker(CCLayoutPackModule* pPacker) { m_packer.reset(pPacker); }
147 
153  int numberOfCrossings() const { return m_nCrossings; }
155 
157 
158 private:
160 
161  void arrangeCCs(PlanRep& PG, GraphAttributes& GA, Array<DPoint>& boundingBox) const;
162  void preprocessCliques(Graph& G, CliqueReplacer& cliqueReplacer);
163  void fillAdjNodes(List<node>& adjNodes, PlanRep& PG, node centerNode, NodeArray<bool>& isClique,
164  Layout& drawing);
165 
167  std::unique_ptr<CrossingMinimizationModule> m_crossMin;
168 
170  std::unique_ptr<EmbedderModule> m_embedder;
171 
173  std::unique_ptr<LayoutPlanRepModule> m_planarLayouter;
174 
176  std::unique_ptr<CCLayoutPackModule> m_packer;
177 
178  double m_pageRatio;
180 
182 };
183 
184 }
ogdf
The namespace for all OGDF objects.
Definition: multilevelmixer.cpp:39
ogdf::GraphAttributes
Stores additional attributes of a graph (like layout information).
Definition: GraphAttributes.h:72
Graph.h
Includes declaration of graph class.
ogdf::PlanarizationLayout::minCliqueSize
int minCliqueSize() const
Returns the current setting of option minCliqueSize.
Definition: PlanarizationLayout.h:106
ogdf::PlanRep
Planarized representations (of a connected component) of a graph.
Definition: PlanRep.h:69
geometry.h
Declaration of classes GenericPoint, GenericPolyline, GenericLine, GenericSegment,...
ogdf::PlanarizationLayout
The planarization approach for drawing graphs.
Definition: PlanarizationLayout.h:59
ogdf::planarization_layout::CliqueReplacer
Definition: CliqueReplacer.h:48
ogdf::CrossingMinimizationModule
Base class for crossing minimization algorithms.
Definition: CrossingMinimizationModule.h:48
CrossingMinimizationModule.h
Declaration of CrossingMinimization Module, an interface for crossing minimization algorithms.
ogdf::PlanarizationLayout::m_packer
std::unique_ptr< CCLayoutPackModule > m_packer
The module for arranging connected components.
Definition: PlanarizationLayout.h:176
LayoutModule.h
Declaration of interface for layout algorithms (class LayoutModule)
ogdf::PlanarizationLayout::minCliqueSize
void minCliqueSize(int i)
Set the option minCliqueSize to i.
Definition: PlanarizationLayout.h:109
ogdf::CCLayoutPackModule
Base class of algorithms that arrange/pack layouts of connected components.
Definition: CCLayoutPackModule.h:49
ogdf::PlanarizationLayout::m_planarLayouter
std::unique_ptr< LayoutPlanRepModule > m_planarLayouter
The module for computing a planar layout.
Definition: PlanarizationLayout.h:173
ogdf::PlanarizationLayout::m_crossMin
std::unique_ptr< CrossingMinimizationModule > m_crossMin
The module for computing a planar subgraph.
Definition: PlanarizationLayout.h:167
ogdf::PlanarizationLayout::setPlanarLayouter
void setPlanarLayouter(LayoutPlanRepModule *pPlanarLayouter)
Sets the module option for the planar layout algorithm.
Definition: PlanarizationLayout.h:136
ogdf::Layout
Stores a layout of a graph (coordinates of nodes, bend points of edges).
Definition: Layout.h:49
ogdf::PlanarizationLayout::m_nCrossings
int m_nCrossings
The number of crossings in the computed layout.
Definition: PlanarizationLayout.h:179
ogdf::Array
The parameterized class Array implements dynamic arrays of type E.
Definition: Array.h:219
ogdf::PlanarizationLayout::m_cliqueSize
int m_cliqueSize
The minimum size of cliques to search for.
Definition: PlanarizationLayout.h:181
ogdf::LayoutPlanRepModule
Interface for planar layout algorithms (used in the planarization approach).
Definition: LayoutPlanRepModule.h:48
CCLayoutPackModule.h
Declaration of interface for algorithms that arrange/pack layouts of connected components.
ogdf::PlanarizationLayout::setEmbedder
void setEmbedder(EmbedderModule *pEmbedder)
Sets the module option for the graph embedding algorithm.
Definition: PlanarizationLayout.h:125
ogdf::List
Doubly linked lists (maintaining the length of the list).
Definition: DfsMakeBiconnected.h:40
ogdf::internal::GraphRegisteredArray
RegisteredArray for nodes, edges and adjEntries of a graph.
Definition: Graph_d.h:658
ogdf::Graph
Data type for general directed graphs (adjacency list representation).
Definition: Graph_d.h:869
CliqueReplacer.h
Handling of clique replacement in planarization layout.
ogdf::PlanarizationLayout::pageRatio
double pageRatio() const
Returns the current setting of option pageRatio.
Definition: PlanarizationLayout.h:96
ogdf::PlanarizationLayout::m_embedder
std::unique_ptr< EmbedderModule > m_embedder
The module for planar embedding.
Definition: PlanarizationLayout.h:170
ogdf::EmbedderModule
Base class for embedder algorithms.
Definition: EmbedderModule.h:52
basic.h
Basic declarations, included by all source files.
OGDF_EXPORT
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:101
EmbedderModule.h
Defines ogdf::EmbedderModule.
ogdf::PlanarizationLayout::m_pageRatio
double m_pageRatio
The desired page ratio.
Definition: PlanarizationLayout.h:178
Array.h
Declaration and implementation of Array class and Array algorithms.
LayoutPlanRepModule.h
Declaration of interface for planar layout algorithms (used in planarization approach).
ogdf::PlanarizationLayout::~PlanarizationLayout
~PlanarizationLayout()
Destructor.
Definition: PlanarizationLayout.h:65
ogdf::NodeElement
Class for the representation of nodes.
Definition: Graph_d.h:240
ogdf::PlanarizationLayout::setPacker
void setPacker(CCLayoutPackModule *pPacker)
Sets the module option for the arrangement of connected components.
Definition: PlanarizationLayout.h:146
ogdf::PlanarizationLayout::pageRatio
void pageRatio(double ratio)
Sets the option pageRatio to ratio.
Definition: PlanarizationLayout.h:99
ogdf::LayoutModule
Interface of general layout algorithms.
Definition: LayoutModule.h:45