Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

HypergraphLayout.h
Go to the documentation of this file.
1 
40 #pragma once
41 
42 #include <ogdf/basic/exceptions.h>
50 #include <ogdf/planarity/PlanRep.h>
51 
52 #include <memory>
53 
54 namespace ogdf {
55 
57 public:
59  enum class Profile { Normal = 0x000001, ElectricCircuit = 0x000002 };
60 
61 private:
63  double m_ratio;
64 
67 
70 
72  // TODO: This might require some tweaks in Hypergraph class.
74 
77 
79  std::unique_ptr<LayoutPlanRepModule> m_planarLayoutModule;
80 
82  std::unique_ptr<CrossingMinimizationModule> m_crossingMinimizationModule;
83 
85  std::unique_ptr<EmbedderModule> m_embeddingModule;
86 
87 public:
88  // constructor
90 
91  // destructor
92  virtual ~HypergraphLayoutES() { }
93 
94  // Dynamic casting is currently not working as desired and hence we left
95  // the following call inherited from superclass empty.
96  virtual void call(HypergraphAttributes& HA) override;
97 
98 #if 0
99  void call(HypergraphAttributesES &HA);
100 #endif
101 
103  HypergraphLayoutES& operator=(const HypergraphLayoutES& hl);
104 
106  int crossings() const { return m_crossings; }
107 
109  double ratio() const { return m_ratio; }
110 
112  void setConstraintIO(bool pConstraintIO) { m_constraintIO = pConstraintIO; }
113 
115  void setProfile(Profile pProfile) { m_profile = pProfile; }
116 
130  void setPlanarLayoutModule(LayoutPlanRepModule* pPlanarLayoutModule) {
131  m_planarLayoutModule.reset(pPlanarLayoutModule);
132  }
133 
140  void setCrossingMinimizationModule(CrossingMinimizationModule* pCrossingMinimizationModule) {
141  m_crossingMinimizationModule.reset(pCrossingMinimizationModule);
142  }
143 
150  void setEmbeddingModule(EmbedderModule* pEmbeddingModule) {
151  m_embeddingModule.reset(pEmbeddingModule);
152  }
153 
155 
156 private:
157  void layout(HypergraphAttributesES& pHA);
158 
159 #if 0
160  void planarizeCC(PlanRep &ccPlanarRep, List<edge> &fixedShell);
161 #endif
162 
163  void packAllCC(const PlanRep& planarRep, const GraphCopySimple& gc, HypergraphAttributesES& pHA,
164  Array<DPoint>& bounding);
165 
166  void insertShell(GraphCopySimple& planarRep, List<node>& src, List<node>& tgt,
167  List<edge>& fixedShell);
168 
169  void removeShell(PlanRep& planarRep, NodePair& st);
170 
171  void applyProfile(HypergraphAttributesES& HA);
172 };
173 
174 }
ogdf::HypergraphAttributes
Stores additional attributes of a hypergraph.
Definition: HypergraphAttributes.h:54
ogdf::HypergraphLayoutES::m_constraintIO
bool m_constraintIO
Defines whether a drawing IO constraint is desired or not.
Definition: HypergraphLayout.h:69
ogdf
The namespace for all OGDF objects.
Definition: AugmentationModule.h:36
ogdf::HypergraphLayoutES::m_ratio
double m_ratio
The ration between width and height of a drawing.
Definition: HypergraphLayout.h:63
ogdf::HypergraphLayoutES::~HypergraphLayoutES
virtual ~HypergraphLayoutES()
Definition: HypergraphLayout.h:92
exceptions.h
Definition of exception classes.
ogdf::PlanRep
Planarized representations (of a connected component) of a graph.
Definition: PlanRep.h:57
ogdf::CrossingMinimizationModule
Base class for crossing minimization algorithms.
Definition: CrossingMinimizationModule.h:41
ogdf::HypergraphLayoutES::setProfile
void setProfile(Profile pProfile)
Sets the layout profile.
Definition: HypergraphLayout.h:115
ogdf::HypergraphAttributesES
Stores additional attributes of edge standard representation of a hypergraph.
Definition: HypergraphAttributes.h:139
ogdf::NodePair
Definition: Graph_d.h:2101
CrossingMinimizationModule.h
Declaration of CrossingMinimization Module, an interface for crossing minimization algorithms.
ogdf::HypergraphLayoutES::m_constraintPorts
bool m_constraintPorts
Defines whether inputs and outputs are placed on different "sides".
Definition: HypergraphLayout.h:73
HypergraphLayoutModule.h
Declaration of an interface for hypergraph layout algorithms. Any hypergraph layout must follow this ...
ogdf::HypergraphLayoutES::m_profile
Profile m_profile
Defines the profile of the layout (eg. Electric Circuit).
Definition: HypergraphLayout.h:76
ogdf::GraphCopySimple
Copies of graphs with mapping between nodes and edges.
Definition: GraphCopy.h:254
ogdf::HypergraphLayoutES::m_planarLayoutModule
std::unique_ptr< LayoutPlanRepModule > m_planarLayoutModule
The module for computing the final layout.
Definition: HypergraphLayout.h:79
PlanRep.h
Declaration of a base class for planar representations of graphs and cluster graphs.
Hypergraph.h
Declaration and a partial implementation of a Hypergraph class partly based on the original classes f...
ogdf::HypergraphLayoutModule
Interface of hypergraph layout algorithms.
Definition: HypergraphLayoutModule.h:43
ogdf::HypergraphLayoutES::crossings
int crossings() const
Returns the number of crossings in computed layout.
Definition: HypergraphLayout.h:106
ogdf::HypergraphLayoutES::setEmbeddingModule
void setEmbeddingModule(EmbedderModule *pEmbeddingModule)
Sets the module option for embedding.
Definition: HypergraphLayout.h:150
ogdf::Array
The parameterized class Array implements dynamic arrays of type E.
Definition: Array.h:214
ogdf::LayoutPlanRepModule
Interface for planar layout algorithms (used in the planarization approach).
Definition: LayoutPlanRepModule.h:45
ogdf::HypergraphLayoutES::m_embeddingModule
std::unique_ptr< EmbedderModule > m_embeddingModule
The module for embedding planarization.
Definition: HypergraphLayout.h:85
EdgeStandardRep.h
A declaration of EdgeStandardRep class representing a graph representation of a hypergraph in the edg...
ogdf::List< edge >
HypergraphAttributes.h
Declares HypergraphAttributes storing specific attributes related to hypergraph layout drawings.
ogdf::HypergraphLayoutES::Profile
Profile
Final appearance is driven by given profile.
Definition: HypergraphLayout.h:59
ogdf::HypergraphLayoutES::setConstraintIO
void setConstraintIO(bool pConstraintIO)
Sets the Input / Output drawing requirement.
Definition: HypergraphLayout.h:112
ogdf::HypergraphLayoutES::m_crossingMinimizationModule
std::unique_ptr< CrossingMinimizationModule > m_crossingMinimizationModule
The module for crossing minimization.
Definition: HypergraphLayout.h:82
ogdf::HypergraphLayoutES::ratio
double ratio() const
Returns the ratio between width and height of a drawing.
Definition: HypergraphLayout.h:109
ogdf::HypergraphLayoutES
Definition: HypergraphLayout.h:56
ogdf::EmbedderModule
Base class for embedder algorithms.
Definition: EmbedderModule.h:49
OGDF_EXPORT
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:101
EmbedderModule.h
Defines ogdf::EmbedderModule.
ogdf::HypergraphLayoutES::m_crossings
int m_crossings
The number of crossings in the layout.
Definition: HypergraphLayout.h:66
LayoutPlanRepModule.h
Declaration of interface for planar layout algorithms (used in planarization approach).
ogdf::HypergraphLayoutES::setCrossingMinimizationModule
void setCrossingMinimizationModule(CrossingMinimizationModule *pCrossingMinimizationModule)
Sets the module option for crossing minimization.
Definition: HypergraphLayout.h:140
ogdf::HypergraphLayoutES::setPlanarLayoutModule
void setPlanarLayoutModule(LayoutPlanRepModule *pPlanarLayoutModule)
Sets the module option for the planar layout.
Definition: HypergraphLayout.h:130