Open
Graph Drawing
Framework

 v. 2020.02 (Catalpa)
 

PlanarizationGridLayout.h
Go to the documentation of this file.
1 
32 #pragma once
33 
35 #include <memory>
38 
39 namespace ogdf {
40 
96 {
97 public:
100 
102 
114  double pageRatio() const {
115  return m_pageRatio;
116  }
117 
119  void pageRatio(double ratio) {
120  m_pageRatio = ratio;
121  }
122 
128  void setCrossMin(CrossingMinimizationModule *pCrossMin) {
130  m_crossMin.reset(pCrossMin);
131  }
132 
133 
145  m_planarLayouter.reset(pPlanarLayouter);
146  }
147 
155  void setPacker(CCLayoutPackModule *pPacker) {
156  m_packer.reset(pPacker);
157  }
158 
159 
165  int numberOfCrossings() const {
167  return m_nCrossings;
168  }
169 
171 
172 protected:
173  virtual void doCall(const Graph &G, GridLayout &gridLayout, IPoint &boundingBox) override;
174 
175 
176 private:
178  std::unique_ptr<CrossingMinimizationModule> m_crossMin;
179 
181  std::unique_ptr<GridLayoutPlanRepModule> m_planarLayouter;
182 
184  std::unique_ptr<CCLayoutPackModule> m_packer;
185 
186  double m_pageRatio;
187 
189 };
190 
191 }
Representation of a graph&#39;s grid layout.
Definition: GridLayout.h:46
Declaration of CrossingMinimization Module, an interface for crossing minimization algorithms...
Base class for grid layout algorithms.
std::unique_ptr< CrossingMinimizationModule > m_crossMin
The module for computing a planar subgraph.
void setPlanarLayouter(GridLayoutPlanRepModule *pPlanarLayouter)
Sets the module option for the planar grid layout algorithm.
Data type for general directed graphs (adjacency list representation).
Definition: Graph_d.h:492
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:99
void setPacker(CCLayoutPackModule *pPacker)
Sets the module option for the arrangement of connected components.
Base class for grid layout algorithms operating on a PlanRep.
int m_nCrossings
The number of crossings in the computed layout.
Declaration of interface for grid layout algorithms.
void pageRatio(double ratio)
Sets the option pageRatio to ratio.
double pageRatio() const
Returns the current setting of option pageRatio.
double m_pageRatio
The desired page ratio.
Base class of algorithms that arrange/pack layouts of connected components.
The planarization grid layout algorithm.
std::unique_ptr< CCLayoutPackModule > m_packer
The module for arranging connected components.
The namespace for all OGDF objects.
Base class for crossing minimization algorithms.
std::unique_ptr< GridLayoutPlanRepModule > m_planarLayouter
The module for computing a planar grid layout.
Declaration of interface for algorithms that arrange/pack layouts of connected components.