Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

PlanarizationGridLayout.h
Go to the documentation of this file.
1 
32 #pragma once
33 
34 #include <ogdf/basic/basic.h>
35 #include <ogdf/basic/geometry.h>
39 
40 #include <memory>
41 
42 namespace ogdf {
43 class Graph;
44 class GridLayout;
45 
97 public:
100 
102 
114  double pageRatio() const { return m_pageRatio; }
115 
117  void pageRatio(double ratio) { m_pageRatio = ratio; }
118 
124  void setCrossMin(CrossingMinimizationModule* pCrossMin) { m_crossMin.reset(pCrossMin); }
126 
138  m_planarLayouter.reset(pPlanarLayouter);
139  }
140 
148  void setPacker(CCLayoutPackModule* pPacker) { m_packer.reset(pPacker); }
149 
155  int numberOfCrossings() const { return m_nCrossings; }
157 
159 
160 protected:
161  virtual void doCall(const Graph& G, GridLayout& gridLayout, IPoint& boundingBox) override;
162 
163 
164 private:
166  std::unique_ptr<CrossingMinimizationModule> m_crossMin;
167 
169  std::unique_ptr<GridLayoutPlanRepModule> m_planarLayouter;
170 
172  std::unique_ptr<CCLayoutPackModule> m_packer;
173 
174  double m_pageRatio;
175 
177 };
178 
179 }
ogdf
The namespace for all OGDF objects.
Definition: multilevelmixer.cpp:39
ogdf::PlanarizationGridLayout::m_packer
std::unique_ptr< CCLayoutPackModule > m_packer
The module for arranging connected components.
Definition: PlanarizationGridLayout.h:172
geometry.h
Declaration of classes GenericPoint, GenericPolyline, GenericLine, GenericSegment,...
ogdf::PlanarizationGridLayout
The planarization grid layout algorithm.
Definition: PlanarizationGridLayout.h:96
ogdf::CrossingMinimizationModule
Base class for crossing minimization algorithms.
Definition: CrossingMinimizationModule.h:48
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:169
ogdf::PlanarizationGridLayout::pageRatio
double pageRatio() const
Returns the current setting of option pageRatio.
Definition: PlanarizationGridLayout.h:114
ogdf::CCLayoutPackModule
Base class of algorithms that arrange/pack layouts of connected components.
Definition: CCLayoutPackModule.h:49
ogdf::PlanarizationGridLayout::pageRatio
void pageRatio(double ratio)
Sets the option pageRatio to ratio.
Definition: PlanarizationGridLayout.h:117
ogdf::PlanarizationGridLayout::m_pageRatio
double m_pageRatio
The desired page ratio.
Definition: PlanarizationGridLayout.h:174
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:212
ogdf::PlanarizationGridLayout::m_crossMin
std::unique_ptr< CrossingMinimizationModule > m_crossMin
The module for computing a planar subgraph.
Definition: PlanarizationGridLayout.h:166
ogdf::gml::Key::Graph
@ Graph
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:148
ogdf::PlanarizationGridLayout::setPlanarLayouter
void setPlanarLayouter(GridLayoutPlanRepModule *pPlanarLayouter)
Sets the module option for the planar grid layout algorithm.
Definition: PlanarizationGridLayout.h:137
basic.h
Basic declarations, included by all source files.
OGDF_EXPORT
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:101
ogdf::PlanarizationGridLayout::m_nCrossings
int m_nCrossings
The number of crossings in the computed layout.
Definition: PlanarizationGridLayout.h:176
ogdf::GridLayoutModule
Base class for grid layout algorithms.
Definition: GridLayoutModule.h:58
ogdf::PlanarizationGridLayout::~PlanarizationGridLayout
~PlanarizationGridLayout()
Definition: PlanarizationGridLayout.h:101
GridLayoutModule.h
Declaration of interface for grid layout algorithms.