Open
Graph Drawing
Framework

 v. 2022.02 (Dogwood)
 

PlanarizationLayout.h
Go to the documentation of this file.
1 
32 #pragma once
33 
39 #include <memory>
41 
42 namespace ogdf {
43 
45 
49 {
50 public:
53 
56 
58 
62  void call(GraphAttributes &ga) override;
63 
65 
71  void call(GraphAttributes &ga, Graph &g);
72 
73  void callSimDraw(GraphAttributes &ga);
74 
80 
85  double pageRatio() const {
86  return m_pageRatio;
87  }
88 
90  void pageRatio(double ratio) {
91  m_pageRatio = ratio;
92  }
93 
95 
99  int minCliqueSize() const {
100  return m_cliqueSize;
101  }
102 
104  void minCliqueSize(int i) {
105  m_cliqueSize = max(i, 3);
106  }
107 
108 
114  void setCrossMin(CrossingMinimizationModule *pCrossMin) {
116  m_crossMin.reset(pCrossMin);
117  }
118 
120 
125  void setEmbedder(EmbedderModule *pEmbedder) {
126  m_embedder.reset(pEmbedder);
127  }
128 
130 
138  void setPlanarLayouter(LayoutPlanRepModule *pPlanarLayouter) {
139  m_planarLayouter.reset(pPlanarLayouter);
140  }
141 
143 
148  void setPacker(CCLayoutPackModule *pPacker) {
149  m_packer.reset(pPacker);
150  }
151 
157  int numberOfCrossings() const {
159  return m_nCrossings;
160  }
161 
163 
164 private:
166 
167  void arrangeCCs(PlanRep &PG, GraphAttributes &GA, Array<DPoint> &boundingBox) const;
168  void preprocessCliques(Graph &G, CliqueReplacer &cliqueReplacer);
169  void fillAdjNodes(List<node>& adjNodes,
170  PlanRep& PG,
171  node centerNode,
172  NodeArray<bool>& isClique,
173  Layout& drawing);
174 
176  std::unique_ptr<CrossingMinimizationModule> m_crossMin;
177 
179  std::unique_ptr<EmbedderModule> m_embedder;
180 
182  std::unique_ptr<LayoutPlanRepModule> m_planarLayouter;
183 
185  std::unique_ptr<CCLayoutPackModule> m_packer;
186 
187  double m_pageRatio;
189 
191 };
192 
193 }
ogdf
The namespace for all OGDF objects.
Definition: AugmentationModule.h:36
ogdf::GraphAttributes
Stores additional attributes of a graph (like layout information).
Definition: GraphAttributes.h:67
ogdf::PlanarizationLayout::minCliqueSize
int minCliqueSize() const
Returns the current setting of option minCliqueSize.
Definition: PlanarizationLayout.h:99
ogdf::PlanRep
Planarized representations (of a connected component) of a graph.
Definition: PlanRep.h:59
ogdf::PlanarizationLayout
The planarization approach for drawing graphs.
Definition: PlanarizationLayout.h:48
ogdf::planarization_layout::CliqueReplacer
Definition: CliqueReplacer.h:40
ogdf::CrossingMinimizationModule
Base class for crossing minimization algorithms.
Definition: CrossingMinimizationModule.h:41
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:185
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:104
ogdf::CCLayoutPackModule
Base class of algorithms that arrange/pack layouts of connected components.
Definition: CCLayoutPackModule.h:48
ogdf::PlanarizationLayout::m_planarLayouter
std::unique_ptr< LayoutPlanRepModule > m_planarLayouter
The module for computing a planar layout.
Definition: PlanarizationLayout.h:182
ogdf::NodeArray< bool >
ogdf::PlanarizationLayout::m_crossMin
std::unique_ptr< CrossingMinimizationModule > m_crossMin
The module for computing a planar subgraph.
Definition: PlanarizationLayout.h:176
ogdf::PlanarizationLayout::setPlanarLayouter
void setPlanarLayouter(LayoutPlanRepModule *pPlanarLayouter)
Sets the module option for the planar layout algorithm.
Definition: PlanarizationLayout.h:138
ogdf::Layout
Stores a layout of a graph (coordinates of nodes, bend points of edges).
Definition: Layout.h:46
ogdf::PlanarizationLayout::m_nCrossings
int m_nCrossings
The number of crossings in the computed layout.
Definition: PlanarizationLayout.h:188
ogdf::Array
The parameterized class Array implements dynamic arrays of type E.
Definition: Array.h:204
ogdf::PlanarizationLayout::m_cliqueSize
int m_cliqueSize
The minimum size of cliques to search for.
Definition: PlanarizationLayout.h:190
ogdf::LayoutPlanRepModule
Interface for planar layout algorithms (used in the planarization approach).
Definition: LayoutPlanRepModule.h:46
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: List.h:40
ogdf::Graph
Data type for general directed graphs (adjacency list representation).
Definition: Graph_d.h:495
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:85
ogdf::PlanarizationLayout::m_embedder
std::unique_ptr< EmbedderModule > m_embedder
The module for planar embedding.
Definition: PlanarizationLayout.h:179
ogdf::EmbedderModule
Base class for embedder algorithms.
Definition: EmbedderModule.h:49
OGDF_EXPORT
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:99
EmbedderModule.h
Defines ogdf::EmbedderModule.
ogdf::PlanarizationLayout::m_pageRatio
double m_pageRatio
The desired page ratio.
Definition: PlanarizationLayout.h:187
LayoutPlanRepModule.h
Declaration of interface for planar layout algorithms (used in planarization approach).
ogdf::PlanarizationLayout::~PlanarizationLayout
~PlanarizationLayout()
Destructor.
Definition: PlanarizationLayout.h:55
ogdf::NodeElement
Class for the representation of nodes.
Definition: Graph_d.h:169
ogdf::PlanarizationLayout::setPacker
void setPacker(CCLayoutPackModule *pPacker)
Sets the module option for the arrangement of connected components.
Definition: PlanarizationLayout.h:148
ogdf::PlanarizationLayout::pageRatio
void pageRatio(double ratio)
Sets the option pageRatio to ratio.
Definition: PlanarizationLayout.h:90
ogdf::LayoutModule
Interface of general layout algorithms.
Definition: LayoutModule.h:44