Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
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
45namespace ogdf {
46class GridLayout;
47class ShellingOrder;
48
123public:
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
189private:
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
203 NodeArray<int>& y);
204};
205
206}
Declaration of interface for graph augmentation algorithms.
Defines ogdf::EmbedderModule.
Includes declaration of graph class.
Declaration of interface for grid layout algorithms.
Declares the base class ShellingOrderModule for modules that compute a shelling order of a graph.
Declaration of classes GenericPoint, GenericPolyline, GenericLine, GenericSegment,...
Basic declarations, included by all source files.
Class for adjacency list elements.
Definition Graph_d.h:143
The base class for graph augmentation algorithms.
Base class for embedder algorithms.
Data type for general directed graphs (adjacency list representation).
Definition Graph_d.h:866
Representation of a graph's grid layout.
Definition GridLayout.h:47
Implementation of the Planar-Draw layout algorithm.
void baseRatio(double ratio)
Sets the option baseRatio to ratio.
std::unique_ptr< EmbedderModule > m_embedder
The planar embedder module.
void sideOptimization(bool opt)
Sets the option sideOptimization to opt.
bool sizeOptimization() const
Returns the current setting of option sizeOptimization.
void sizeOptimization(bool opt)
Sets the option sizeOptimization to opt.
bool m_sizeOptimization
The option for allowing arbitrary slopes.
bool m_sideOptimization
The option for size optimization.
double baseRatio() const
Returns the current setting of option baseRatio.
void setAugmenter(AugmentationModule *pAugmenter)
Sets the augmentation module.
double m_baseRatio
The option for specifying the base ratio.
virtual void doCall(const Graph &G, adjEntry adjExternal, GridLayout &gridLayout, IPoint &boundingBox, bool fixEmbedding) override
Implements the algorithm call.
std::unique_ptr< ShellingOrderModule > m_computeOrder
The shelling order module.
void setEmbedder(EmbedderModule *pEmbedder)
Sets the module option for the graph embedding algorithm.
void setShellingOrder(ShellingOrderModule *pOrder)
Sets the shelling order module.
std::unique_ptr< AugmentationModule > m_augmenter
The augmentation module.
void computeCoordinates(const Graph &G, ShellingOrder &order, NodeArray< int > &x, NodeArray< int > &y)
bool sideOptimization() const
Returns the current setting of option sideOptimization.
PlanarDrawLayout()
Constructs an instance of the Planar-Draw layout algorithm.
Base class for planar grid layout algorithms.
The shelling order of a graph.
Base class for modules that compute a shelling order of a graph.
RegisteredArray for nodes, edges and adjEntries of a graph.
Definition Graph_d.h:659
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF dynamic library (shared object / DLL),...
Definition config.h:117
The namespace for all OGDF objects.