Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

PlanarStraightLayout.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 
118 public:
121 
123 
135  bool sizeOptimization() const { return m_sizeOptimization; }
136 
138  void sizeOptimization(bool opt) { m_sizeOptimization = opt; }
139 
147  double baseRatio() const { return m_baseRatio; }
148 
150  void baseRatio(double ratio) { m_baseRatio = ratio; }
151 
163  void setAugmenter(AugmentationModule* pAugmenter) { m_augmenter.reset(pAugmenter); }
164 
166  void setShellingOrder(ShellingOrderModule* pOrder) { m_computeOrder.reset(pOrder); }
167 
169  void setEmbedder(EmbedderModule* pEmbedder) { m_embedder.reset(pEmbedder); }
170 
172 
173 private:
175  double m_baseRatio;
176 
177  std::unique_ptr<EmbedderModule> m_embedder;
178  std::unique_ptr<AugmentationModule> m_augmenter;
179  std::unique_ptr<ShellingOrderModule> m_computeOrder;
180 
181  virtual void doCall(const Graph& G, adjEntry adjExternal, GridLayout& gridLayout,
182  IPoint& boundingBox, bool fixEmbedding) override;
183 
184  void computeCoordinates(const Graph& G, ShellingOrder& lmc, NodeArray<int>& x, NodeArray<int>& y);
185 };
186 
187 }
ogdf::PlanarStraightLayout::m_baseRatio
double m_baseRatio
The option for specifying the base ratio.
Definition: PlanarStraightLayout.h:175
ogdf
The namespace for all OGDF objects.
Definition: multilevelmixer.cpp:39
ogdf::PlanarStraightLayout::m_augmenter
std::unique_ptr< AugmentationModule > m_augmenter
The augmentation module.
Definition: PlanarStraightLayout.h:178
ShellingOrderModule.h
Declares the base class ShellingOrderModule for modules that compute a shelling order of a graph.
Graph.h
Includes declaration of graph class.
ogdf::GenericPoint< int >
geometry.h
Declaration of classes GenericPoint, GenericPolyline, GenericLine, GenericSegment,...
ogdf::PlanarStraightLayout::~PlanarStraightLayout
~PlanarStraightLayout()
Definition: PlanarStraightLayout.h:122
ogdf::ShellingOrderModule
Base class for modules that compute a shelling order of a graph.
Definition: ShellingOrderModule.h:48
ogdf::PlanarStraightLayout::baseRatio
double baseRatio() const
Returns the current setting of option baseRatio.
Definition: PlanarStraightLayout.h:147
ogdf::PlanarStraightLayout::setEmbedder
void setEmbedder(EmbedderModule *pEmbedder)
Sets the module option for the graph embedding algorithm.
Definition: PlanarStraightLayout.h:169
ogdf::AdjElement
Class for adjacency list elements.
Definition: Graph_d.h:142
ogdf::PlanarStraightLayout::m_embedder
std::unique_ptr< EmbedderModule > m_embedder
The planar embedder module.
Definition: PlanarStraightLayout.h:177
AugmentationModule.h
Declaration of interface for graph augmentation algorithms.
ogdf::PlanarStraightLayout::setAugmenter
void setAugmenter(AugmentationModule *pAugmenter)
Sets the augmentation module.
Definition: PlanarStraightLayout.h:163
ogdf::PlanarGridLayoutModule
Base class for planar grid layout algorithms.
Definition: GridLayoutModule.h:138
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::PlanarStraightLayout::sizeOptimization
void sizeOptimization(bool opt)
Sets the option sizeOptimization to opt.
Definition: PlanarStraightLayout.h:138
ogdf::PlanarStraightLayout::m_sizeOptimization
bool m_sizeOptimization
The option for size optimization.
Definition: PlanarStraightLayout.h:174
ogdf::PlanarStraightLayout::m_computeOrder
std::unique_ptr< ShellingOrderModule > m_computeOrder
The shelling order module.
Definition: PlanarStraightLayout.h:179
ogdf::EmbedderModule
Base class for embedder algorithms.
Definition: EmbedderModule.h:52
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::PlanarStraightLayout::sizeOptimization
bool sizeOptimization() const
Returns the current setting of option sizeOptimization.
Definition: PlanarStraightLayout.h:135
ogdf::GridLayout
Representation of a graph's grid layout.
Definition: GridLayout.h:47
ogdf::PlanarStraightLayout
Implementation of the Planar-Straight layout algorithm.
Definition: PlanarStraightLayout.h:117
ogdf::PlanarStraightLayout::setShellingOrder
void setShellingOrder(ShellingOrderModule *pOrder)
Sets the shelling order module.
Definition: PlanarStraightLayout.h:166
ogdf::ShellingOrder
The shelling order of a graph.
Definition: ShellingOrder.h:116
ogdf::PlanarStraightLayout::baseRatio
void baseRatio(double ratio)
Sets the option baseRatio to ratio.
Definition: PlanarStraightLayout.h:150
GridLayoutModule.h
Declaration of interface for grid layout algorithms.