Open
Graph Drawing
Framework

 v. snapshot-2017-02-16
 

PlanarDrawLayout.h
Go to the documentation of this file.
1 
33 #pragma once
34 
36 #include <memory>
41 
42 namespace ogdf {
43 
118 {
119 public:
122 
124 
125 
137  bool sizeOptimization() const { return m_sizeOptimization; }
138 
140  void sizeOptimization(bool opt) { m_sizeOptimization = opt; }
141 
148  bool sideOptimization() const { return m_sizeOptimization; }
149 
151  void sideOptimization(bool opt) { m_sizeOptimization = opt; }
152 
160  double baseRatio() const { return m_baseRatio; }
161 
163  void baseRatio(double ratio) { m_baseRatio = ratio; }
164 
165 
177  void setAugmenter(AugmentationModule *pAugmenter) {
178  m_augmenter.reset(pAugmenter);
179  }
180 
183  m_computeOrder.reset(pOrder);
184  }
185 
187  void setEmbedder(EmbedderModule *pEmbedder) {
188  m_embedder.reset(pEmbedder);
189  }
190 
192 
193 private:
196  double m_baseRatio;
197 
198  std::unique_ptr<EmbedderModule> m_embedder;
199  std::unique_ptr<AugmentationModule> m_augmenter;
200  std::unique_ptr<ShellingOrderModule> m_computeOrder;
201 
202  // computes grid layout for graph G
203  virtual void doCall(
204  const Graph &G,
205  adjEntry adjExternal,
206  GridLayout &gridLayout,
207  IPoint &boundingBox,
208  bool fixEmbedding) override;
209 
210  void computeCoordinates(const Graph &G,
211  ShellingOrder &order,
212  NodeArray<int> &x,
213  NodeArray<int> &y);
214 
215 };
216 
217 
218 } // end namespace ogdf
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:472
#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.
void setEmbedder(EmbedderModule *pEmbedder)
Sets the module option for the graph embedding algorithm.
double baseRatio() const
Returns the current setting of option baseRatio.
Base class for planar grid layout algorithms.
void setAugmenter(AugmentationModule *pAugmenter)
Sets the augmentation module.
Implementation of the Planar-Draw layout algorithm.
void baseRatio(double ratio)
Sets the option baseRatio to ratio.
std::unique_ptr< AugmentationModule > m_augmenter
The augmentation module.
std::unique_ptr< EmbedderModule > m_embedder
The planar embedder module.
Declaration of interface for embedder for graphs.
void setShellingOrder(ShellingOrderModule *pOrder)
Sets the shelling order module.
Integer points.
Definition: geometry.h:156
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...
The shelling order of a graph.
bool m_sideOptimization
The option for size optimization.
Declaration of interface for graph augmentation algorithms.
double m_baseRatio
The option for specifying the base ratio.
bool sizeOptimization() const
Returns the current setting of option sizeOptimization.
std::unique_ptr< ShellingOrderModule > m_computeOrder
The shelling order module.
The base class for graph augmentation algorithms.
The namespace for all OGDF objects.
Base class for embedder algorithms.
void sideOptimization(bool opt)
Sets the option sideOptimization to opt.
bool sideOptimization() const
Returns the current setting of option sideOptimization.
void sizeOptimization(bool opt)
Sets the option sizeOptimization to opt.
Class for adjacency list elements.
Definition: Graph_d.h:78
bool m_sizeOptimization
The option for allowing arbitrary slopes.