Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

PlanarDrawLayout.h
Go to the documentation of this file.
1 
33 #pragma once
34 
40 
41 #include <memory>
42 
43 namespace ogdf {
44 
119 public:
122 
124 
136  bool sizeOptimization() const { return m_sizeOptimization; }
137 
139  void sizeOptimization(bool opt) { m_sizeOptimization = opt; }
140 
147  bool sideOptimization() const { return m_sizeOptimization; }
148 
150  void sideOptimization(bool opt) { m_sizeOptimization = opt; }
151 
159  double baseRatio() const { return m_baseRatio; }
160 
162  void baseRatio(double ratio) { m_baseRatio = ratio; }
163 
175  void setAugmenter(AugmentationModule* pAugmenter) { m_augmenter.reset(pAugmenter); }
176 
178  void setShellingOrder(ShellingOrderModule* pOrder) { m_computeOrder.reset(pOrder); }
179 
181  void setEmbedder(EmbedderModule* pEmbedder) { m_embedder.reset(pEmbedder); }
182 
184 
185 private:
188  double m_baseRatio;
189 
190  std::unique_ptr<EmbedderModule> m_embedder;
191  std::unique_ptr<AugmentationModule> m_augmenter;
192  std::unique_ptr<ShellingOrderModule> m_computeOrder;
193 
194  // computes grid layout for graph G
195  virtual void doCall(const Graph& G, adjEntry adjExternal, GridLayout& gridLayout,
196  IPoint& boundingBox, bool fixEmbedding) override;
197 
198  void computeCoordinates(const Graph& G, ShellingOrder& order, NodeArray<int>& x,
199  NodeArray<int>& y);
200 };
201 
202 }
ogdf
The namespace for all OGDF objects.
Definition: AugmentationModule.h:36
ShellingOrderModule.h
Declares the base class ShellingOrderModule for modules that compute a shelling order of a graph.
ogdf::PlanarDrawLayout::m_baseRatio
double m_baseRatio
The option for specifying the base ratio.
Definition: PlanarDrawLayout.h:188
ogdf::GenericPoint< int >
ogdf::ShellingOrderModule
Base class for modules that compute a shelling order of a graph.
Definition: ShellingOrderModule.h:44
ogdf::PlanarDrawLayout::m_computeOrder
std::unique_ptr< ShellingOrderModule > m_computeOrder
The shelling order module.
Definition: PlanarDrawLayout.h:192
ogdf::PlanarDrawLayout::m_augmenter
std::unique_ptr< AugmentationModule > m_augmenter
The augmentation module.
Definition: PlanarDrawLayout.h:191
ogdf::AdjElement
Class for adjacency list elements.
Definition: Graph_d.h:135
ogdf::PlanarDrawLayout::sideOptimization
void sideOptimization(bool opt)
Sets the option sideOptimization to opt.
Definition: PlanarDrawLayout.h:150
AugmentationModule.h
Declaration of interface for graph augmentation algorithms.
ogdf::PlanarDrawLayout::sizeOptimization
void sizeOptimization(bool opt)
Sets the option sizeOptimization to opt.
Definition: PlanarDrawLayout.h:139
ogdf::PlanarDrawLayout::baseRatio
double baseRatio() const
Returns the current setting of option baseRatio.
Definition: PlanarDrawLayout.h:159
ogdf::PlanarGridLayoutModule
Base class for planar grid layout algorithms.
Definition: GridLayoutModule.h:133
ogdf::PlanarDrawLayout::~PlanarDrawLayout
~PlanarDrawLayout()
Definition: PlanarDrawLayout.h:123
ogdf::internal::GraphRegisteredArray
RegisteredArray for nodes, edges and adjEntries of a graph.
Definition: Graph_d.h:651
ogdf::Graph
Data type for general directed graphs (adjacency list representation).
Definition: Graph_d.h:862
ogdf::AugmentationModule
The base class for graph augmentation algorithms.
Definition: AugmentationModule.h:53
ogdf::PlanarDrawLayout::sideOptimization
bool sideOptimization() const
Returns the current setting of option sideOptimization.
Definition: PlanarDrawLayout.h:147
ogdf::PlanarDrawLayout::setShellingOrder
void setShellingOrder(ShellingOrderModule *pOrder)
Sets the shelling order module.
Definition: PlanarDrawLayout.h:178
ogdf::EmbedderModule
Base class for embedder algorithms.
Definition: EmbedderModule.h:49
ogdf::PlanarDrawLayout::baseRatio
void baseRatio(double ratio)
Sets the option baseRatio to ratio.
Definition: PlanarDrawLayout.h:162
ogdf::PlanarDrawLayout::m_sideOptimization
bool m_sideOptimization
The option for size optimization.
Definition: PlanarDrawLayout.h:187
OGDF_EXPORT
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:101
EmbedderModule.h
Defines ogdf::EmbedderModule.
ShellingOrder.h
Declares classes ShellingOrderSet and ShellingOrder.
ogdf::PlanarDrawLayout
Implementation of the Planar-Draw layout algorithm.
Definition: PlanarDrawLayout.h:118
ogdf::PlanarDrawLayout::sizeOptimization
bool sizeOptimization() const
Returns the current setting of option sizeOptimization.
Definition: PlanarDrawLayout.h:136
ogdf::GridLayout
Representation of a graph's grid layout.
Definition: GridLayout.h:46
ogdf::PlanarDrawLayout::setEmbedder
void setEmbedder(EmbedderModule *pEmbedder)
Sets the module option for the graph embedding algorithm.
Definition: PlanarDrawLayout.h:181
ogdf::PlanarDrawLayout::m_embedder
std::unique_ptr< EmbedderModule > m_embedder
The planar embedder module.
Definition: PlanarDrawLayout.h:190
ogdf::PlanarDrawLayout::m_sizeOptimization
bool m_sizeOptimization
The option for allowing arbitrary slopes.
Definition: PlanarDrawLayout.h:186
ogdf::ShellingOrder
The shelling order of a graph.
Definition: ShellingOrder.h:113
ogdf::PlanarDrawLayout::setAugmenter
void setAugmenter(AugmentationModule *pAugmenter)
Sets the augmentation module.
Definition: PlanarDrawLayout.h:175
GridLayoutModule.h
Declaration of interface for grid layout algorithms.