Open
Graph Drawing
Framework

 v. snapshot-2017-02-16
 

HypergraphLayout.h
Go to the documentation of this file.
1 
40 #pragma once
41 
46 
47 #include <ogdf/basic/exceptions.h>
48 #include <memory>
52 
53 #include <ogdf/planarity/PlanRep.h>
54 
55 namespace ogdf {
56 
58 
59 public:
60 
62  enum class Profile {
63  Normal = 0x000001,
64  ElectricCircuit = 0x000002
65  };
66 
67 private:
68 
70  double m_ratio;
71 
74 
77 
79  // TODO: This might require some tweaks in Hypergraph class.
81 
84 
86  std::unique_ptr<LayoutPlanRepModule> m_planarLayoutModule;
87 
89  std::unique_ptr<CrossingMinimizationModule> m_crossingMinimizationModule;
90 
92  std::unique_ptr<EmbedderModule> m_embeddingModule;
93 
94 public:
95 
96  // constructor
98 
99  // destructor
100  virtual ~HypergraphLayoutES() { }
101 
102  // Dynamic casting is currently not working as desired and hence we left
103  // the following call inherited from superclass empty.
104  virtual void call(HypergraphAttributes &HA) override;
105 
106 #if 0
107  void call(HypergraphAttributesES &HA);
108 #endif
109 
111  HypergraphLayoutES &operator=(const HypergraphLayoutES &hl);
112 
114  int crossings() const
115  {
116  return m_crossings;
117  }
118 
120  double ratio() const
121  {
122  return m_ratio;
123  }
124 
126  void setConstraintIO(bool pConstraintIO)
127  {
128  m_constraintIO = pConstraintIO;
129  }
130 
132  void setProfile(Profile pProfile)
133  {
134  m_profile = pProfile;
135  }
136 
150  void setPlanarLayoutModule
151  (LayoutPlanRepModule *pPlanarLayoutModule)
152  {
153  m_planarLayoutModule.reset(pPlanarLayoutModule);
154  }
155 
156 
163  void setCrossingMinimizationModule
164  (CrossingMinimizationModule *pCrossingMinimizationModule)
165  {
166  m_crossingMinimizationModule.reset(pCrossingMinimizationModule);
167  }
168 
175  void setEmbeddingModule
176  (EmbedderModule *pEmbeddingModule)
177  {
178  m_embeddingModule.reset(pEmbeddingModule);
179  }
180 
181 private:
182 
183  void layout(HypergraphAttributesES &pHA);
184 
185 #if 0
186  void planarizeCC(PlanRep &ccPlanarRep, List<edge> &fixedShell);
187 #endif
188 
189  void packAllCC(const PlanRep &planarRep,
190  const GraphCopySimple &gc,
192  Array<DPoint> &bounding);
193 
194  NodePair *insertShell(GraphCopySimple &planarRep,
195  List<node> &src,
196  List<node> &tgt,
197  List<edge> &fixedShell);
198 
199  void removeShell(PlanRep &planarRep, NodePair &st);
200 
201  void applyProfile(HypergraphAttributesES &HA);
202 
203 };
204 
205 } // end namespace ogdf
Declaration of CrossingMinimization Module, an interface for crossing minimization algorithms...
Declares HypergraphAttributes storing specific attributes related to hypergraph layout drawings...
The parameterized class Array implements dynamic arrays of type E.
Definition: Array.h:56
bool m_constraintIO
Defines whether a drawing IO constraint is desired or not.
Stores additional attributes of edge standard representation of a hypergraph.
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:99
double ratio() const
Returns the ratio between width and height of a drawing.
Declaration of a base class for planar representations of graphs and cluster graphs.
Declaration of an interface for hypergraph layout algorithms.
Profile
Final appearance is driven by given profile.
std::unique_ptr< EmbedderModule > m_embeddingModule
The module for embedding planarization.
std::unique_ptr< CrossingMinimizationModule > m_crossingMinimizationModule
The module for crossing minimization.
Declaration of interface for embedder for graphs.
Interface for planar layout algorithms (used in the planarization approach).
void setProfile(Profile pProfile)
Sets the layout profile.
Definition of exception classes.
bool m_constraintPorts
Defines whether inputs and outputs are placed on different "sides".
std::unique_ptr< LayoutPlanRepModule > m_planarLayoutModule
The module for computing the final layout.
Declaration and a partial implementation of a Hypergraph class partly based on the original classes f...
Copies of graphs with mapping between nodes and edges.
Definition: GraphCopy.h:60
double m_ratio
The ration between width and height of a drawing.
A declaration of EdgeStandardRep class representing a graph representation of a hypergraph in the edg...
Profile m_profile
Defines the profile of the layout (eg. Electric Circuit).
int m_crossings
The number of crossings in the layout.
Interface of hypergraph layout algorithms.
int crossings() const
Returns the number of crossings in computed layout.
The namespace for all OGDF objects.
Base class for embedder algorithms.
Base class for crossing minimization algorithms.
void setConstraintIO(bool pConstraintIO)
Sets the Input / Output drawing requirement.
Stores additional attributes of a hypergraph.
Planarized representations (of a connected component) of a graph.
Definition: PlanRep.h:60
Declaration of interface for planar layout algorithms (used in planarization approach).