Open
Graph Drawing
Framework

 v. snapshot-2017-02-16
 

PlanarizationGridLayout.h
Go to the documentation of this file.
1 
32 #pragma once
33 
35 #include <memory>
38 
39 
40 namespace ogdf {
41 
42 
98 {
99 public:
102 
104 
116  double pageRatio() const {
117  return m_pageRatio;
118  }
119 
121  void pageRatio(double ratio) {
122  m_pageRatio = ratio;
123  }
124 
130  void setCrossMin(CrossingMinimizationModule *pCrossMin) {
132  m_crossMin.reset(pCrossMin);
133  }
134 
135 
147  m_planarLayouter.reset(pPlanarLayouter);
148  }
149 
157  void setPacker(CCLayoutPackModule *pPacker) {
158  m_packer.reset(pPacker);
159  }
160 
161 
167  int numberOfCrossings() const {
169  return m_nCrossings;
170  }
171 
173 
174 protected:
175  virtual void doCall(const Graph &G, GridLayout &gridLayout, IPoint &boundingBox) override;
176 
177 
178 private:
180  std::unique_ptr<CrossingMinimizationModule> m_crossMin;
181 
183  std::unique_ptr<GridLayoutPlanRepModule> m_planarLayouter;
184 
186  std::unique_ptr<CCLayoutPackModule> m_packer;
187 
188  double m_pageRatio;
189 
191 };
192 
193 
194 } // end namespace ogdf
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:472
#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.
Integer points.
Definition: geometry.h:156
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.