Open
Graph Drawing
Framework

 v. 2020.02 (Catalpa)
 

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 }
Declaration of CrossingMinimization Module, an interface for crossing minimization algorithms...
The parameterized class Array implements dynamic arrays of type E.
Definition: Array.h:200
The planarization approach for drawing graphs.
Data type for general directed graphs (adjacency list representation).
Definition: Graph_d.h:492
void setPlanarLayouter(LayoutPlanRepModule *pPlanarLayouter)
Sets the module option for the planar layout algorithm.
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:99
void pageRatio(double ratio)
Sets the option pageRatio to ratio.
Handling of clique replacement in planarization layout.
std::unique_ptr< CCLayoutPackModule > m_packer
The module for arranging connected components.
Defines ogdf::EmbedderModule.
Interface for planar layout algorithms (used in the planarization approach).
int minCliqueSize() const
Returns the current setting of option minCliqueSize.
double pageRatio() const
Returns the current setting of option pageRatio.
Stores additional attributes of a graph (like layout information).
Doubly linked lists (maintaining the length of the list).
Definition: List.h:40
Base class of algorithms that arrange/pack layouts of connected components.
std::unique_ptr< LayoutPlanRepModule > m_planarLayouter
The module for computing a planar layout.
Declaration of interface for layout algorithms (class LayoutModule)
Class for the representation of nodes.
Definition: Graph_d.h:169
Interface of general layout algorithms.
Definition: LayoutModule.h:44
void setEmbedder(EmbedderModule *pEmbedder)
Sets the module option for the graph embedding algorithm.
std::unique_ptr< EmbedderModule > m_embedder
The module for planar embedding.
std::unique_ptr< CrossingMinimizationModule > m_crossMin
The module for computing a planar subgraph.
double m_pageRatio
The desired page ratio.
int m_nCrossings
The number of crossings in the computed layout.
The namespace for all OGDF objects.
Base class for embedder algorithms.
void setPacker(CCLayoutPackModule *pPacker)
Sets the module option for the arrangement of connected components.
Base class for crossing minimization algorithms.
void minCliqueSize(int i)
Set the option minCliqueSize to i.
int m_cliqueSize
The minimum size of cliques to search for.
Planarized representations (of a connected component) of a graph.
Definition: PlanRep.h:59
Declaration of interface for algorithms that arrange/pack layouts of connected components.
Declaration of interface for planar layout algorithms (used in planarization approach).
Stores a layout of a graph (coordinates of nodes, bend points of edges).
Definition: Layout.h:46