Open
Graph Drawing
Framework

 v. 2022.02 (Dogwood)
 

PlanarizationGridLayout.h
Go to the documentation of this file.
1 
32 #pragma once
33 
35 #include <memory>
38 
39 namespace ogdf {
40 
92 {
93 public:
96 
98 
110  double pageRatio() const {
111  return m_pageRatio;
112  }
113 
115  void pageRatio(double ratio) {
116  m_pageRatio = ratio;
117  }
118 
124  void setCrossMin(CrossingMinimizationModule *pCrossMin) {
126  m_crossMin.reset(pCrossMin);
127  }
128 
129 
141  m_planarLayouter.reset(pPlanarLayouter);
142  }
143 
151  void setPacker(CCLayoutPackModule *pPacker) {
152  m_packer.reset(pPacker);
153  }
154 
155 
161  int numberOfCrossings() const {
163  return m_nCrossings;
164  }
165 
167 
168 protected:
169  virtual void doCall(const Graph &G, GridLayout &gridLayout, IPoint &boundingBox) override;
170 
171 
172 private:
174  std::unique_ptr<CrossingMinimizationModule> m_crossMin;
175 
177  std::unique_ptr<GridLayoutPlanRepModule> m_planarLayouter;
178 
180  std::unique_ptr<CCLayoutPackModule> m_packer;
181 
182  double m_pageRatio;
183 
185 };
186 
187 }
ogdf
The namespace for all OGDF objects.
Definition: AugmentationModule.h:36
ogdf::PlanarizationGridLayout::m_packer
std::unique_ptr< CCLayoutPackModule > m_packer
The module for arranging connected components.
Definition: PlanarizationGridLayout.h:180
ogdf::PlanarizationGridLayout
The planarization grid layout algorithm.
Definition: PlanarizationGridLayout.h:91
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::PlanarizationGridLayout::m_planarLayouter
std::unique_ptr< GridLayoutPlanRepModule > m_planarLayouter
The module for computing a planar grid layout.
Definition: PlanarizationGridLayout.h:177
ogdf::PlanarizationGridLayout::pageRatio
double pageRatio() const
Returns the current setting of option pageRatio.
Definition: PlanarizationGridLayout.h:110
ogdf::CCLayoutPackModule
Base class of algorithms that arrange/pack layouts of connected components.
Definition: CCLayoutPackModule.h:48
ogdf::PlanarizationGridLayout::pageRatio
void pageRatio(double ratio)
Sets the option pageRatio to ratio.
Definition: PlanarizationGridLayout.h:115
ogdf::PlanarizationGridLayout::m_pageRatio
double m_pageRatio
The desired page ratio.
Definition: PlanarizationGridLayout.h:182
ogdf::IPoint
GenericPoint< int > IPoint
Representing a two-dimensional point with integer coordinates.
Definition: geometry.h:241
ogdf::GridLayoutPlanRepModule
Base class for grid layout algorithms operating on a PlanRep.
Definition: GridLayoutModule.h:223
ogdf::PlanarizationGridLayout::m_crossMin
std::unique_ptr< CrossingMinimizationModule > m_crossMin
The module for computing a planar subgraph.
Definition: PlanarizationGridLayout.h:174
CCLayoutPackModule.h
Declaration of interface for algorithms that arrange/pack layouts of connected components.
ogdf::PlanarizationGridLayout::setPacker
void setPacker(CCLayoutPackModule *pPacker)
Sets the module option for the arrangement of connected components.
Definition: PlanarizationGridLayout.h:151
ogdf::PlanarizationGridLayout::setPlanarLayouter
void setPlanarLayouter(GridLayoutPlanRepModule *pPlanarLayouter)
Sets the module option for the planar grid layout algorithm.
Definition: PlanarizationGridLayout.h:140
OGDF_EXPORT
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:99
ogdf::PlanarizationGridLayout::m_nCrossings
int m_nCrossings
The number of crossings in the computed layout.
Definition: PlanarizationGridLayout.h:184
ogdf::GridLayoutModule
Base class for grid layout algorithms.
Definition: GridLayoutModule.h:53
ogdf::PlanarizationGridLayout::~PlanarizationGridLayout
~PlanarizationGridLayout()
Definition: PlanarizationGridLayout.h:97
GridLayoutModule.h
Declaration of interface for grid layout algorithms.