Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

PlanarizerStarReinsertion.h
Go to the documentation of this file.
1 
32 #pragma once
33 
34 #include <ogdf/basic/DualGraph.h>
35 #include <ogdf/basic/Graph.h>
36 #include <ogdf/basic/basic.h>
39 
40 #include <cstdint>
41 #include <memory>
42 
43 namespace ogdf::embedder {
44 class CrossingStructure;
45 } // namespace ogdf::embedder
46 
47 namespace ogdf {
48 class GraphCopy;
49 class PlanRep;
50 
51 using embedder::CrossingStructure;
52 
54 
108 private:
110  std::unique_ptr<CrossingMinimizationModule> m_planarization;
111 
113 
115 
117 
118  int64_t m_stopTime;
119 
137  bool reinsertStar(GraphCopy& currentPlanarization, DynamicDualGraph& dualGraph,
138  node nodeToReinsert, CrossingStructure& bestCS, const EdgeArray<int>* pCostOrig,
139  const EdgeArray<bool>* pForbiddenOrig, const EdgeArray<uint32_t>* pEdgeSubGraphs);
140 
142 
156  ReturnType mainLoop(const PlanRep& pr, CrossingStructure& bestCS, const EdgeArray<int>* pCostOrig,
157  const EdgeArray<bool>* pForbiddenOrig, const EdgeArray<uint32_t>* pEdgeSubGraphs);
158 
159 protected:
161 
165  virtual ReturnType doCall(PlanRep& pr, int cc, const EdgeArray<int>* pCostOrig,
166  const EdgeArray<bool>* pForbiddenOrig, const EdgeArray<uint32_t>* pEdgeSubGraphs,
167  int& crossingNumber) override;
168 
169 public:
172 
175 
177  virtual CrossingMinimizationModule* clone() const override;
178 
180  PlanarizerStarReinsertion& operator=(const PlanarizerStarReinsertion& planarizer);
181 
183  void setPlanarization(CrossingMinimizationModule* pPlanarizationModule) {
184  m_planarization.reset(pPlanarizationModule);
185  }
186 
189 
191  bool setTimeout() { return m_setTimeout; }
192 
194  void setTimeout(bool b) { m_setTimeout = b; }
195 
197  int maxIterations() { return m_maxIterations; }
198 
200 
211  void maxIterations(int maxIterations) { m_maxIterations = maxIterations; }
212 
214 };
215 
216 }
ogdf
The namespace for all OGDF objects.
Definition: multilevelmixer.cpp:39
Graph.h
Includes declaration of graph class.
ogdf::PlanRep
Planarized representations (of a connected component) of a graph.
Definition: PlanRep.h:69
ogdf::embedder::CrossingStructure
Definition: CrossingStructure.h:43
ogdf::PlanarizerStarReinsertion::m_setTimeout
bool m_setTimeout
Helper to insert stars.
Definition: PlanarizerStarReinsertion.h:114
ogdf::CrossingMinimizationModule
Base class for crossing minimization algorithms.
Definition: CrossingMinimizationModule.h:48
ogdf::DualGraphBase
A dual graph including its combinatorial embedding of an embedded graph.
Definition: DualGraph.h:47
CrossingMinimizationModule.h
Declaration of CrossingMinimization Module, an interface for crossing minimization algorithms.
ogdf::PlanarizerStarReinsertion::m_inserter
StarInserter m_inserter
Definition: PlanarizerStarReinsertion.h:112
ogdf::GraphCopy
Copies of graphs supporting edge splitting.
Definition: GraphCopy.h:391
ogdf::PlanarizerStarReinsertion::m_planarization
std::unique_ptr< CrossingMinimizationModule > m_planarization
The initial planarization algorithm.
Definition: PlanarizerStarReinsertion.h:110
ogdf::StarInserter
Definition: StarInserter.h:237
ogdf::PlanarizerStarReinsertion::m_stopTime
int64_t m_stopTime
When the algorithm should stop.
Definition: PlanarizerStarReinsertion.h:118
ogdf::PlanarizerStarReinsertion::setPlanarization
void setPlanarization(CrossingMinimizationModule *pPlanarizationModule)
Sets the module option for the computation of the inital planarization.
Definition: PlanarizerStarReinsertion.h:183
ogdf::embedder
Definition: ConnectedSubgraph.h:38
ogdf::PlanarizerStarReinsertion::maxIterations
int maxIterations()
Returns the number of maxIterations.
Definition: PlanarizerStarReinsertion.h:197
ogdf::PlanarizerStarReinsertion::setTimeout
bool setTimeout()
Returns the current setting of options setTimeout.
Definition: PlanarizerStarReinsertion.h:191
ogdf::PlanarizerStarReinsertion::setTimeout
void setTimeout(bool b)
Sets the option setTimeout to b.
Definition: PlanarizerStarReinsertion.h:194
DualGraph.h
Includes declaration of dual graph class.
ogdf::PlanarizerStarReinsertion::m_maxIterations
int m_maxIterations
The maximum number of iterations.
Definition: PlanarizerStarReinsertion.h:116
ogdf::PlanarizerStarReinsertion::maxIterations
void maxIterations(int maxIterations)
Sets the maximum number of iterations.
Definition: PlanarizerStarReinsertion.h:211
basic.h
Basic declarations, included by all source files.
OGDF_EXPORT
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:101
ogdf::PlanarizerStarReinsertion
The star (re-)insertion approach for crossing minimization.
Definition: PlanarizerStarReinsertion.h:107
StarInserter.h
Declaration of class StarInserter.
ogdf::Module::ReturnType
ReturnType
The return type of a module.
Definition: Module.h:52
ogdf::NodeElement
Class for the representation of nodes.
Definition: Graph_d.h:240
ogdf::internal::EdgeArrayBase2
RegisteredArray for edges of a graph, specialized for EdgeArray<edge>.
Definition: Graph_d.h:716