Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
PlanarizerMixedInsertion.h
Go to the documentation of this file.
1
32#pragma once
33
34#include <ogdf/basic/Graph.h>
35#include <ogdf/basic/basic.h>
38
39#include <cstdint>
40#include <memory>
41
42namespace ogdf {
43class PlanRep;
44
76protected:
78
81 virtual ReturnType doCall(PlanRep& pr, int cc, const EdgeArray<int>* pCostOrig,
82 const EdgeArray<bool>* pForbiddenOrig, const EdgeArray<uint32_t>* pEdgeSubGraphs,
83 int& crossingNumber) override;
84 // (The algorithm may still work when pr is not simple and the checking
85 // assertion is removed as long as only edge insertion is used.)
86
87public:
91 Random,
92 HigherDegree,
93 LowerDegree,
94 HigherNonPlanarDegree,
96 LowerNonPlanarDegree,
98 BothEndpoints
99 };
100
103
106
108 virtual CrossingMinimizationModule* clone() const override;
109
112
114 void setSubgraph(PlanarSubgraphModule<int>* pSubgraph) { m_subgraph.reset(pSubgraph); }
115
117 NodeSelectionMethod nodeSelectionMethod() { return m_nodeSelectionMethod; }
118
120 void nodeSelectionMethod(NodeSelectionMethod method) { m_nodeSelectionMethod = method; }
121
122private:
124 std::unique_ptr<PlanarSubgraphModule<int>> m_subgraph;
125
128};
129
130}
Declaration of CrossingMinimization Module, an interface for crossing minimization algorithms.
Includes declaration of graph class.
Declaration of interface for planar subgraph algorithms.
Basic declarations, included by all source files.
Base class for crossing minimization algorithms.
ReturnType
The return type of a module.
Definition Module.h:52
Planarized representations (of a connected component) of a graph.
Definition PlanRep.h:68
Interface for planar subgraph algorithms.
Computes a planar subgraph of the graph and then re-inserts each original node that is incident to at...
NodeSelectionMethod nodeSelectionMethod()
Returns the used method of selecting nodes to reinsert.
void nodeSelectionMethod(NodeSelectionMethod method)
Sets the used method of selecting nodes to reinsert.
void setSubgraph(PlanarSubgraphModule< int > *pSubgraph)
Sets the module option for the computation of the planar subgraph.
PlanarizerMixedInsertion & operator=(const PlanarizerMixedInsertion &planarizer)
Assignment operator, copies option settings only.
PlanarizerMixedInsertion(const PlanarizerMixedInsertion &planarizer)
Creates a PlanarizerMixedInsertion with the same settings as planarizer.
virtual CrossingMinimizationModule * clone() const override
Returns a new PlanarizerMixedInsertion with the same option settings.
PlanarizerMixedInsertion()
Creates a PlanarizerMixedInsertion with default settings.
std::unique_ptr< PlanarSubgraphModule< int > > m_subgraph
< The planar subgraph algorithm.
NodeSelectionMethod
Determines the node(s) of each deleted edge e which will be reinserted if neither of them is a cut ve...
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.
RegisteredArray for edges of a graph, specialized for EdgeArray<edge>.
Definition Graph_d.h:717
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF dynamic library (shared object / DLL),...
Definition config.h:117
The namespace for all OGDF objects.