Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

PlanarizerMixedInsertion.h
Go to the documentation of this file.
1 
32 #pragma once
33 
36 
37 namespace ogdf {
38 
70 protected:
72 
75  virtual ReturnType doCall(PlanRep& pr, int cc, const EdgeArray<int>* pCostOrig,
76  const EdgeArray<bool>* pForbiddenOrig, const EdgeArray<uint32_t>* pEdgeSubGraphs,
77  int& crossingNumber) override;
78  // (The algorithm may still work when pr is not simple and the checking
79  // assertion is removed as long as only edge insertion is used.)
80 
81 public:
84  enum class NodeSelectionMethod {
85  Random,
86  HigherDegree,
87  LowerDegree,
88  HigherNonPlanarDegree,
89  LowerNonPlanarDegree,
91  BothEndpoints
93  };
94 
97 
100 
102  virtual CrossingMinimizationModule* clone() const override;
103 
105  PlanarizerMixedInsertion& operator=(const PlanarizerMixedInsertion& planarizer);
106 
108  void setSubgraph(PlanarSubgraphModule<int>* pSubgraph) { m_subgraph.reset(pSubgraph); }
109 
111  NodeSelectionMethod nodeSelectionMethod() { return m_nodeSelectionMethod; }
112 
114  void nodeSelectionMethod(NodeSelectionMethod method) { m_nodeSelectionMethod = method; }
115 
116 private:
118  std::unique_ptr<PlanarSubgraphModule<int>> m_subgraph;
119 
122 };
123 
124 }
ogdf
The namespace for all OGDF objects.
Definition: AugmentationModule.h:36
ogdf::PlanarSubgraphModule< int >
ogdf::PlanarizerMixedInsertion::nodeSelectionMethod
NodeSelectionMethod nodeSelectionMethod()
Returns the used method of selecting nodes to reinsert.
Definition: PlanarizerMixedInsertion.h:111
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::PlanarizerMixedInsertion::nodeSelectionMethod
void nodeSelectionMethod(NodeSelectionMethod method)
Sets the used method of selecting nodes to reinsert.
Definition: PlanarizerMixedInsertion.h:114
CrossingMinimizationModule.h
Declaration of CrossingMinimization Module, an interface for crossing minimization algorithms.
ogdf::PlanarizerMixedInsertion
Definition: PlanarizerMixedInsertion.h:69
ogdf::PlanarizerMixedInsertion::m_subgraph
std::unique_ptr< PlanarSubgraphModule< int > > m_subgraph
< The planar subgraph algorithm.
Definition: PlanarizerMixedInsertion.h:118
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:84
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:108
ogdf::PlanarizerMixedInsertion::m_nodeSelectionMethod
NodeSelectionMethod m_nodeSelectionMethod
Definition: PlanarizerMixedInsertion.h:121
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:50
ogdf::internal::EdgeArrayBase2
RegisteredArray for edges of a graph, specialized for EdgeArray<edge>.
Definition: Graph_d.h:709