Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

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 
42 namespace ogdf {
43 class PlanRep;
44 
76 protected:
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 
87 public:
90  enum class NodeSelectionMethod {
91  Random,
92  HigherDegree,
93  LowerDegree,
94  HigherNonPlanarDegree,
95  LowerNonPlanarDegree,
97  BothEndpoints
99  };
100 
103 
106 
108  virtual CrossingMinimizationModule* clone() const override;
109 
111  PlanarizerMixedInsertion& operator=(const PlanarizerMixedInsertion& planarizer);
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 
122 private:
124  std::unique_ptr<PlanarSubgraphModule<int>> m_subgraph;
125 
128 };
129 
130 }
ogdf
The namespace for all OGDF objects.
Definition: multilevelmixer.cpp:39
ogdf::PlanarSubgraphModule< int >
Graph.h
Includes declaration of graph class.
ogdf::PlanarizerMixedInsertion::nodeSelectionMethod
NodeSelectionMethod nodeSelectionMethod()
Returns the used method of selecting nodes to reinsert.
Definition: PlanarizerMixedInsertion.h:117
ogdf::PlanRep
Planarized representations (of a connected component) of a graph.
Definition: PlanRep.h:69
ogdf::CrossingMinimizationModule
Base class for crossing minimization algorithms.
Definition: CrossingMinimizationModule.h:48
ogdf::PlanarizerMixedInsertion::nodeSelectionMethod
void nodeSelectionMethod(NodeSelectionMethod method)
Sets the used method of selecting nodes to reinsert.
Definition: PlanarizerMixedInsertion.h:120
CrossingMinimizationModule.h
Declaration of CrossingMinimization Module, an interface for crossing minimization algorithms.
ogdf::PlanarizerMixedInsertion
Definition: PlanarizerMixedInsertion.h:75
ogdf::PlanarizerMixedInsertion::m_subgraph
std::unique_ptr< PlanarSubgraphModule< int > > m_subgraph
< The planar subgraph algorithm.
Definition: PlanarizerMixedInsertion.h:124
ogdf::PlanarizerMixedInsertion::NodeSelectionMethod
NodeSelectionMethod
Determines the node(s) of each deleted edge e which will be reinserted if neither of them is a cut ve...
Definition: PlanarizerMixedInsertion.h:90
PlanarSubgraphModule.h
Declaration of interface for planar subgraph algorithms.
ogdf::PlanarizerMixedInsertion::setSubgraph
void setSubgraph(PlanarSubgraphModule< int > *pSubgraph)
Sets the module option for the computation of the planar subgraph.
Definition: PlanarizerMixedInsertion.h:114
ogdf::PlanarizerMixedInsertion::m_nodeSelectionMethod
NodeSelectionMethod m_nodeSelectionMethod
Definition: PlanarizerMixedInsertion.h:127
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::Module::ReturnType
ReturnType
The return type of a module.
Definition: Module.h:52
ogdf::internal::EdgeArrayBase2
RegisteredArray for edges of a graph, specialized for EdgeArray<edge>.
Definition: Graph_d.h:716