Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

PlanarDrawLayout.h
Go to the documentation of this file.
1 
33 #pragma once
34 
35 #include <ogdf/basic/Graph.h>
36 #include <ogdf/basic/basic.h>
37 #include <ogdf/basic/geometry.h>
42 
43 #include <memory>
44 
45 namespace ogdf {
46 class GridLayout;
47 class ShellingOrder;
48 
123 public:
126 
128 
140  bool sizeOptimization() const { return m_sizeOptimization; }
141 
143  void sizeOptimization(bool opt) { m_sizeOptimization = opt; }
144 
151  bool sideOptimization() const { return m_sizeOptimization; }
152 
154  void sideOptimization(bool opt) { m_sizeOptimization = opt; }
155 
163  double baseRatio() const { return m_baseRatio; }
164 
166  void baseRatio(double ratio) { m_baseRatio = ratio; }
167 
179  void setAugmenter(AugmentationModule* pAugmenter) { m_augmenter.reset(pAugmenter); }
180 
182  void setShellingOrder(ShellingOrderModule* pOrder) { m_computeOrder.reset(pOrder); }
183 
185  void setEmbedder(EmbedderModule* pEmbedder) { m_embedder.reset(pEmbedder); }
186 
188 
189 private:
192  double m_baseRatio;
193 
194  std::unique_ptr<EmbedderModule> m_embedder;
195  std::unique_ptr<AugmentationModule> m_augmenter;
196  std::unique_ptr<ShellingOrderModule> m_computeOrder;
197 
198  // computes grid layout for graph G
199  virtual void doCall(const Graph& G, adjEntry adjExternal, GridLayout& gridLayout,
200  IPoint& boundingBox, bool fixEmbedding) override;
201 
202  void computeCoordinates(const Graph& G, ShellingOrder& order, NodeArray<int>& x,
203  NodeArray<int>& y);
204 };
205 
206 }
ogdf
The namespace for all OGDF objects.
Definition: multilevelmixer.cpp:39
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:192
Graph.h
Includes declaration of graph class.
ogdf::GenericPoint< int >
geometry.h
Declaration of classes GenericPoint, GenericPolyline, GenericLine, GenericSegment,...
ogdf::ShellingOrderModule
Base class for modules that compute a shelling order of a graph.
Definition: ShellingOrderModule.h:48
ogdf::PlanarDrawLayout::m_computeOrder
std::unique_ptr< ShellingOrderModule > m_computeOrder
The shelling order module.
Definition: PlanarDrawLayout.h:196
ogdf::PlanarDrawLayout::m_augmenter
std::unique_ptr< AugmentationModule > m_augmenter
The augmentation module.
Definition: PlanarDrawLayout.h:195
ogdf::AdjElement
Class for adjacency list elements.
Definition: Graph_d.h:142
ogdf::PlanarDrawLayout::sideOptimization
void sideOptimization(bool opt)
Sets the option sideOptimization to opt.
Definition: PlanarDrawLayout.h:154
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:143
ogdf::PlanarDrawLayout::baseRatio
double baseRatio() const
Returns the current setting of option baseRatio.
Definition: PlanarDrawLayout.h:163
ogdf::PlanarGridLayoutModule
Base class for planar grid layout algorithms.
Definition: GridLayoutModule.h:138
ogdf::PlanarDrawLayout::~PlanarDrawLayout
~PlanarDrawLayout()
Definition: PlanarDrawLayout.h:127
ogdf::internal::GraphRegisteredArray
RegisteredArray for nodes, edges and adjEntries of a graph.
Definition: Graph_d.h:658
ogdf::Graph
Data type for general directed graphs (adjacency list representation).
Definition: Graph_d.h:869
ogdf::AugmentationModule
The base class for graph augmentation algorithms.
Definition: AugmentationModule.h:56
ogdf::PlanarDrawLayout::sideOptimization
bool sideOptimization() const
Returns the current setting of option sideOptimization.
Definition: PlanarDrawLayout.h:151
ogdf::PlanarDrawLayout::setShellingOrder
void setShellingOrder(ShellingOrderModule *pOrder)
Sets the shelling order module.
Definition: PlanarDrawLayout.h:182
ogdf::EmbedderModule
Base class for embedder algorithms.
Definition: EmbedderModule.h:52
ogdf::PlanarDrawLayout::baseRatio
void baseRatio(double ratio)
Sets the option baseRatio to ratio.
Definition: PlanarDrawLayout.h:166
ogdf::PlanarDrawLayout::m_sideOptimization
bool m_sideOptimization
The option for size optimization.
Definition: PlanarDrawLayout.h:191
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
EmbedderModule.h
Defines ogdf::EmbedderModule.
ogdf::PlanarDrawLayout
Implementation of the Planar-Draw layout algorithm.
Definition: PlanarDrawLayout.h:122
ogdf::PlanarDrawLayout::sizeOptimization
bool sizeOptimization() const
Returns the current setting of option sizeOptimization.
Definition: PlanarDrawLayout.h:140
ogdf::GridLayout
Representation of a graph's grid layout.
Definition: GridLayout.h:47
ogdf::PlanarDrawLayout::setEmbedder
void setEmbedder(EmbedderModule *pEmbedder)
Sets the module option for the graph embedding algorithm.
Definition: PlanarDrawLayout.h:185
ogdf::PlanarDrawLayout::m_embedder
std::unique_ptr< EmbedderModule > m_embedder
The planar embedder module.
Definition: PlanarDrawLayout.h:194
ogdf::PlanarDrawLayout::m_sizeOptimization
bool m_sizeOptimization
The option for allowing arbitrary slopes.
Definition: PlanarDrawLayout.h:190
ogdf::ShellingOrder
The shelling order of a graph.
Definition: ShellingOrder.h:116
ogdf::PlanarDrawLayout::setAugmenter
void setAugmenter(AugmentationModule *pAugmenter)
Sets the augmentation module.
Definition: PlanarDrawLayout.h:179
GridLayoutModule.h
Declaration of interface for grid layout algorithms.