Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
PlanarStraightLayout.h
Go to the documentation of this file.
1
33#pragma once
34
40
41#include <memory>
42
43namespace ogdf {
44
114public:
117
119
131 bool sizeOptimization() const { return m_sizeOptimization; }
132
134 void sizeOptimization(bool opt) { m_sizeOptimization = opt; }
135
143 double baseRatio() const { return m_baseRatio; }
144
146 void baseRatio(double ratio) { m_baseRatio = ratio; }
147
160
162 void setShellingOrder(ShellingOrderModule* pOrder) { m_computeOrder.reset(pOrder); }
163
165 void setEmbedder(EmbedderModule* pEmbedder) { m_embedder.reset(pEmbedder); }
166
168
169private:
171 double m_baseRatio;
172
173 std::unique_ptr<EmbedderModule> m_embedder;
174 std::unique_ptr<AugmentationModule> m_augmenter;
175 std::unique_ptr<ShellingOrderModule> m_computeOrder;
176
178 IPoint& boundingBox, bool fixEmbedding) override;
179
181};
182
183}
Declaration of interface for graph augmentation algorithms.
Defines ogdf::EmbedderModule.
Declaration of interface for grid layout algorithms.
Declares classes ShellingOrderSet and ShellingOrder.
Declares the base class ShellingOrderModule for modules that compute a shelling order of a graph.
Class for adjacency list elements.
Definition Graph_d.h:79
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:521
Representation of a graph's grid layout.
Definition GridLayout.h:46
Dynamic arrays indexed with nodes.
Definition NodeArray.h:125
Base class for planar grid layout algorithms.
Implementation of the Planar-Straight layout algorithm.
void computeCoordinates(const Graph &G, ShellingOrder &lmc, NodeArray< int > &x, NodeArray< int > &y)
double m_baseRatio
The option for specifying the base ratio.
bool sizeOptimization() const
Returns the current setting of option sizeOptimization.
void setShellingOrder(ShellingOrderModule *pOrder)
Sets the shelling order module.
std::unique_ptr< AugmentationModule > m_augmenter
The augmentation module.
double baseRatio() const
Returns the current setting of option baseRatio.
std::unique_ptr< ShellingOrderModule > m_computeOrder
The shelling order module.
std::unique_ptr< EmbedderModule > m_embedder
The planar embedder module.
void setEmbedder(EmbedderModule *pEmbedder)
Sets the module option for the graph embedding algorithm.
void baseRatio(double ratio)
Sets the option baseRatio to ratio.
bool m_sizeOptimization
The option for size optimization.
void sizeOptimization(bool opt)
Sets the option sizeOptimization to opt.
void setAugmenter(AugmentationModule *pAugmenter)
Sets the augmentation module.
virtual void doCall(const Graph &G, adjEntry adjExternal, GridLayout &gridLayout, IPoint &boundingBox, bool fixEmbedding) override
Implements the algorithm call.
PlanarStraightLayout()
Constructs an instance of the Planar-Straight layout algorithm.
The shelling order of a graph.
Base class for modules that compute a shelling order of a graph.
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition config.h:101
static MultilevelBuilder * getDoubleFactoredZeroAdjustedMerger()
The namespace for all OGDF objects.