Open
Graph Drawing
Framework

 v. 2020.02 (Catalpa)
 

PlanarStraightLayout.h
Go to the documentation of this file.
1 
33 #pragma once
34 
36 #include <memory>
41 
42 namespace ogdf {
43 
113 {
114 public:
117 
119 
120 
132  bool sizeOptimization() const { return m_sizeOptimization; }
133 
135  void sizeOptimization(bool opt) { m_sizeOptimization = opt; }
136 
144  double baseRatio() const { return m_baseRatio; }
145 
147  void baseRatio(double ratio) { m_baseRatio = ratio; }
148 
149 
161  void setAugmenter(AugmentationModule *pAugmenter) {
162  m_augmenter.reset(pAugmenter);
163  }
164 
167  m_computeOrder.reset(pOrder);
168  }
169 
171  void setEmbedder(EmbedderModule *pEmbedder) {
172  m_embedder.reset(pEmbedder);
173  }
174 
176 
177 private:
179  double m_baseRatio;
180 
181  std::unique_ptr<EmbedderModule> m_embedder;
182  std::unique_ptr<AugmentationModule> m_augmenter;
183  std::unique_ptr<ShellingOrderModule> m_computeOrder;
184 
185  virtual void doCall(
186  const Graph &G,
187  adjEntry adjExternal,
188  GridLayout &gridLayout,
189  IPoint &boundingBox,
190  bool fixEmbedding) override;
191 
192  void computeCoordinates(const Graph &G,
193  ShellingOrder &lmc,
194  NodeArray<int> &x,
195  NodeArray<int> &y);
196 
197 };
198 
199 }
Representation of a graph&#39;s grid layout.
Definition: GridLayout.h:46
Data type for general directed graphs (adjacency list representation).
Definition: Graph_d.h:492
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:99
Base class for modules that compute a shelling order of a graph.
double baseRatio() const
Returns the current setting of option baseRatio.
Base class for planar grid layout algorithms.
Defines ogdf::EmbedderModule.
double m_baseRatio
The option for specifying the base ratio.
void baseRatio(double ratio)
Sets the option baseRatio to ratio.
bool sizeOptimization() const
Returns the current setting of option sizeOptimization.
Implementation of the Planar-Straight layout algorithm.
Declaration of interface for grid layout algorithms.
Declares classes ShellingOrderSet and ShellingOrder.
void setEmbedder(EmbedderModule *pEmbedder)
Sets the module option for the graph embedding algorithm.
std::unique_ptr< EmbedderModule > m_embedder
The planar embedder module.
Declares the base class ShellingOrderModule for modules that compute a shelling order of a graph...
The shelling order of a graph.
bool m_sizeOptimization
The option for size optimization.
void sizeOptimization(bool opt)
Sets the option sizeOptimization to opt.
Declaration of interface for graph augmentation algorithms.
void setShellingOrder(ShellingOrderModule *pOrder)
Sets the shelling order module.
std::unique_ptr< AugmentationModule > m_augmenter
The augmentation module.
void setAugmenter(AugmentationModule *pAugmenter)
Sets the augmentation module.
The base class for graph augmentation algorithms.
std::unique_ptr< ShellingOrderModule > m_computeOrder
The shelling order module.
The namespace for all OGDF objects.
Base class for embedder algorithms.
Class for adjacency list elements.
Definition: Graph_d.h:79