Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
PlanarizerStarReinsertion.h
Go to the documentation of this file.
1
32#pragma once
33
37
38#include <memory>
39
40namespace ogdf {
41
42using embedder::CrossingStructure;
43
45
99private:
101 std::unique_ptr<CrossingMinimizationModule> m_planarization;
102
104
106
108
110
131
133
149
150protected:
152
158 int& crossingNumber) override;
159
160public:
163
166
168 virtual CrossingMinimizationModule* clone() const override;
169
172
177
180
182 bool setTimeout() { return m_setTimeout; }
183
185 void setTimeout(bool b) { m_setTimeout = b; }
186
188 int maxIterations() { return m_maxIterations; }
189
191
202 void maxIterations(int maxIterations) { m_maxIterations = maxIterations; }
203
205};
206
207}
Declaration of CrossingMinimization Module, an interface for crossing minimization algorithms.
Declaration of class CrossingStructure.
Declaration of class StarInserter.
Base class for crossing minimization algorithms.
A dual graph including its combinatorial embedding of an embedded graph.
Definition DualGraph.h:56
Dynamic arrays indexed with edges.
Definition EdgeArray.h:125
Copies of graphs supporting edge splitting.
Definition GraphCopy.h:254
ReturnType
The return type of a module.
Definition Module.h:50
Class for the representation of nodes.
Definition Graph_d.h:177
Planarized representations (of a connected component) of a graph.
Definition PlanRep.h:57
The star (re-)insertion approach for crossing minimization.
std::unique_ptr< CrossingMinimizationModule > m_planarization
The initial planarization algorithm.
int m_maxIterations
The maximum number of iterations.
bool reinsertStar(GraphCopy &currentPlanarization, DynamicDualGraph &dualGraph, node nodeToReinsert, CrossingStructure &bestCS, const EdgeArray< int > *pCostOrig, const EdgeArray< bool > *pForbiddenOrig, const EdgeArray< uint32_t > *pEdgeSubGraphs)
Reinserts the star nodeToReinsert in currentPlanarization.
int maxIterations()
Returns the number of maxIterations.
ReturnType mainLoop(const PlanRep &pr, CrossingStructure &bestCS, const EdgeArray< int > *pCostOrig, const EdgeArray< bool > *pForbiddenOrig, const EdgeArray< uint32_t > *pEdgeSubGraphs)
Reinserts a specific set of stars until a termination criterion is met.
void maxIterations(int maxIterations)
Sets the maximum number of iterations.
virtual ReturnType doCall(PlanRep &pr, int cc, const EdgeArray< int > *pCostOrig, const EdgeArray< bool > *pForbiddenOrig, const EdgeArray< uint32_t > *pEdgeSubGraphs, int &crossingNumber) override
Implements the algorithm call.
void setTimeout(bool b)
Sets the option setTimeout to b.
int64_t m_stopTime
When the algorithm should stop.
virtual CrossingMinimizationModule * clone() const override
Returns a new PlanarizerStarReinsertion with the same option settings.
PlanarizerStarReinsertion(const PlanarizerStarReinsertion &planarizer)
Creates a PlanarizerStarReinsertion with the same settings as planarizer.
void setPlanarization(CrossingMinimizationModule *pPlanarizationModule)
Sets the module option for the computation of the inital planarization.
PlanarizerStarReinsertion()
Creates a PlanarizerStarReinsertion with default settings.
bool m_setTimeout
Helper to insert stars.
PlanarizerStarReinsertion & operator=(const PlanarizerStarReinsertion &planarizer)
Assignment operator, copies option settings only.
bool setTimeout()
Returns the current setting of options setTimeout.
Inserts a star (a vertex and its incident edges) optimally into an embedding.
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition config.h:101
static MultilevelBuilder * getDoubleFactoredZeroAdjustedMerger()
The namespace for all OGDF objects.