Open
Graph Drawing
Framework

 v. 2020.02 (Catalpa)
 

VarEdgeInserterDynCore.h
Go to the documentation of this file.
1 
33 #pragma once
34 
35 #include <ogdf/basic/Timeouter.h>
36 #include <ogdf/basic/Module.h>
39 
40 
41 namespace ogdf {
42 
43 
45 {
46 public:
48  PlanRepLight &pr,
49  const EdgeArray<int> *pCostOrig,
50  const EdgeArray<bool> *pForbiddenOrig,
51  const EdgeArray<uint32_t> *pEdgeSubgraphs)
52  : m_pr(pr), m_pCost(pCostOrig), m_pForbidden(pForbiddenOrig), m_pSubgraph(pEdgeSubgraphs) { }
53 
55 
56  Module::ReturnType call(
57  const Array<edge> &origEdges,
58  RemoveReinsertType rrPost,
59  double percentMostCrossed);
60 
61  int runsPostprocessing() const { return m_runsPostprocessing; }
62 
63 protected:
64  class BCandSPQRtrees;
65  class ExpandedGraph;
66 
67  int costCrossed(edge eOrig) const;
68 
69  void insert(edge eOrig, SList<adjEntry> &eip);
70  void blockInsert(node s, node t, List<adjEntry> &L);
71 
72  virtual void storeTypeOfCurrentEdge(edge eOrig) { }
73  virtual BCandSPQRtrees *createBCandSPQRtrees();
74  virtual ExpandedGraph *createExpandedGraph(BCandSPQRtrees &BC);
75 
76  virtual void buildSubpath(node v,
77  node vPred,
78  node vSucc,
79  List<adjEntry> &L,
80  ExpandedGraph &Exp,
81  node s,
82  node t);
83 
84  static const int c_bigM = 10000;
86 
90 
91  BCandSPQRtrees *m_pBC;
92 
94 };
95 
96 
98 {
99 public:
101  PlanRepLight &pr,
102  const EdgeArray<int> *pCostOrig,
103  const EdgeArray<uint32_t> *pEdgeSubgraph) : VarEdgeInserterDynCore(pr, pCostOrig, nullptr, pEdgeSubgraph) { }
104 
105 protected:
106  class BCandSPQRtreesUML;
107  class ExpandedGraphUML;
108 
109  void storeTypeOfCurrentEdge(edge eOrig) override { m_typeOfCurrentEdge = m_pr.typeOrig(eOrig); }
110  virtual BCandSPQRtrees *createBCandSPQRtrees() override;
111  virtual ExpandedGraph *createExpandedGraph(BCandSPQRtrees &BC) override;
112  virtual void buildSubpath(node v,
113  node vPred,
114  node vSucc,
115  List<adjEntry> &L,
116  ExpandedGraph &Exp,
117  node s,
118  node t) override;
119 
121 };
122 
123 
124 }
The parameterized class Array implements dynamic arrays of type E.
Definition: Array.h:200
void storeTypeOfCurrentEdge(edge eOrig) override
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:99
Declares base class for all module types.
RemoveReinsertType
The postprocessing method for edge insertion algorithms.
const EdgeArray< int > * m_pCost
virtual void storeTypeOfCurrentEdge(edge eOrig)
Definition of RemoveReinsertType (used for postprocessing in edge insertion algorithms).
int m_runsPostprocessing
Runs of remove-reinsert method.
const EdgeArray< uint32_t > * m_pSubgraph
ReturnType
The return type of a module.
Definition: Module.h:51
Singly linked lists (maintaining the length of the list).
Definition: SList.h:773
Light-weight version of a planarized representation, associated with a PlanRep.
Definition: PlanRepLight.h:44
const EdgeArray< bool > * m_pForbidden
class for timeout funtionality.
Definition: Timeouter.h:47
EdgeType
The type of edges (only used in derived classes).
Definition: Graph_d.h:538
Doubly linked lists (maintaining the length of the list).
Definition: List.h:40
VarEdgeInserterDynCore(PlanRepLight &pr, const EdgeArray< int > *pCostOrig, const EdgeArray< bool > *pForbiddenOrig, const EdgeArray< uint32_t > *pEdgeSubgraphs)
Class for the representation of edges.
Definition: Graph_d.h:292
Class for the representation of nodes.
Definition: Graph_d.h:169
VarEdgeInserterDynUMLCore(PlanRepLight &pr, const EdgeArray< int > *pCostOrig, const EdgeArray< uint32_t > *pEdgeSubgraph)
Declaration of class PlanRepLight.
Declares base class for modules with timeout functionality.
The namespace for all OGDF objects.