Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

VarEdgeInserterDynCore.h
Go to the documentation of this file.
1 
33 #pragma once
34 
35 #include <ogdf/basic/Array.h>
36 #include <ogdf/basic/Graph.h>
37 #include <ogdf/basic/Module.h>
38 #include <ogdf/basic/Timeouter.h>
39 #include <ogdf/basic/basic.h>
41 
42 #include <cstdint>
43 
44 namespace ogdf {
45 enum class RemoveReinsertType;
46 template<class E>
47 class List;
48 template<class E>
49 class SList;
50 
52 public:
54  const EdgeArray<bool>* pForbiddenOrig, const EdgeArray<uint32_t>* pEdgeSubgraphs)
55  : m_pr(pr), m_pCost(pCostOrig), m_pForbidden(pForbiddenOrig), m_pSubgraph(pEdgeSubgraphs) { }
56 
58 
59  Module::ReturnType call(const Array<edge>& origEdges, RemoveReinsertType rrPost,
60  double percentMostCrossed);
61 
62  int runsPostprocessing() const { return m_runsPostprocessing; }
63 
64 protected:
65  class BCandSPQRtrees;
66  class ExpandedGraph;
67 
68  int costCrossed(edge eOrig) const;
69 
70  void insert(edge eOrig, SList<adjEntry>& eip);
71  void blockInsert(node s, node t, List<adjEntry>& L);
72 
73  virtual void storeTypeOfCurrentEdge(edge eOrig) { }
74 
75  virtual BCandSPQRtrees* createBCandSPQRtrees();
76  virtual ExpandedGraph* createExpandedGraph(BCandSPQRtrees& BC);
77 
78  virtual void buildSubpath(node v, node vPred, node vSucc, List<adjEntry>& L, ExpandedGraph& Exp,
79  node s, node t);
80 
81  static const int c_bigM = 10000;
83 
87 
88  BCandSPQRtrees* m_pBC;
89 
91 };
92 
94 public:
96  const EdgeArray<uint32_t>* pEdgeSubgraph)
97  : VarEdgeInserterDynCore(pr, pCostOrig, nullptr, pEdgeSubgraph) { }
98 
99 protected:
100  class BCandSPQRtreesUML;
101  class ExpandedGraphUML;
102 
103  void storeTypeOfCurrentEdge(edge eOrig) override { m_typeOfCurrentEdge = m_pr.typeOrig(eOrig); }
104 
105  virtual BCandSPQRtrees* createBCandSPQRtrees() override;
106  virtual ExpandedGraph* createExpandedGraph(BCandSPQRtrees& BC) override;
107  virtual void buildSubpath(node v, node vPred, node vSucc, List<adjEntry>& L, ExpandedGraph& Exp,
108  node s, node t) override;
109 
111 };
112 
113 
114 }
ogdf
The namespace for all OGDF objects.
Definition: multilevelmixer.cpp:39
Graph.h
Includes declaration of graph class.
ogdf::VarEdgeInserterDynCore::m_pSubgraph
const EdgeArray< uint32_t > * m_pSubgraph
Definition: VarEdgeInserterDynCore.h:86
ogdf::VarEdgeInserterDynUMLCore::storeTypeOfCurrentEdge
void storeTypeOfCurrentEdge(edge eOrig) override
Definition: VarEdgeInserterDynCore.h:103
ogdf::VarEdgeInserterDynCore::m_pCost
const EdgeArray< int > * m_pCost
Definition: VarEdgeInserterDynCore.h:84
ogdf::Graph::EdgeType
EdgeType
The type of edges (only used in derived classes).
Definition: Graph_d.h:909
ogdf::VarEdgeInserterDynUMLCore::createExpandedGraph
virtual ExpandedGraph * createExpandedGraph(BCandSPQRtrees &BC) override
ogdf::SList
Singly linked lists (maintaining the length of the list).
Definition: SList.h:845
ogdf::VarEdgeInserterDynUMLCore::m_typeOfCurrentEdge
Graph::EdgeType m_typeOfCurrentEdge
Definition: VarEdgeInserterDynCore.h:110
ogdf::VarEdgeInserterDynUMLCore::buildSubpath
virtual void buildSubpath(node v, node vPred, node vSucc, List< adjEntry > &L, ExpandedGraph &Exp, node s, node t) override
ogdf::PlanRepLight
Light-weight version of a planarized representation, associated with a PlanRep.
Definition: PlanRepLight.h:45
ogdf::VarEdgeInserterDynCore::VarEdgeInserterDynCore
VarEdgeInserterDynCore(PlanRepLight &pr, const EdgeArray< int > *pCostOrig, const EdgeArray< bool > *pForbiddenOrig, const EdgeArray< uint32_t > *pEdgeSubgraphs)
Definition: VarEdgeInserterDynCore.h:53
ogdf::VarEdgeInserterDynCore::m_pr
PlanRepLight & m_pr
Definition: VarEdgeInserterDynCore.h:82
ogdf::VarEdgeInserterDynUMLCore::createBCandSPQRtrees
virtual BCandSPQRtrees * createBCandSPQRtrees() override
Timeouter.h
Declares base class for modules with timeout functionality.
ogdf::VarEdgeInserterDynUMLCore::VarEdgeInserterDynUMLCore
VarEdgeInserterDynUMLCore(PlanRepLight &pr, const EdgeArray< int > *pCostOrig, const EdgeArray< uint32_t > *pEdgeSubgraph)
Definition: VarEdgeInserterDynCore.h:95
ogdf::VarEdgeInserterDynCore::m_runsPostprocessing
int m_runsPostprocessing
Runs of remove-reinsert method.
Definition: VarEdgeInserterDynCore.h:90
ogdf::Array
The parameterized class Array implements dynamic arrays of type E.
Definition: Array.h:219
ogdf::VarEdgeInserterDynCore::storeTypeOfCurrentEdge
virtual void storeTypeOfCurrentEdge(edge eOrig)
Definition: VarEdgeInserterDynCore.h:73
ogdf::VarEdgeInserterDynUMLCore
Definition: VarEdgeInserterDynCore.h:93
ogdf::List
Doubly linked lists (maintaining the length of the list).
Definition: DfsMakeBiconnected.h:40
ogdf::PlanRepLight::typeOrig
EdgeType typeOrig(edge eOrig) const
Definition: PlanRepLight.h:82
PlanRepLight.h
Declaration of class PlanRepLight.
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::VarEdgeInserterDynCore
Definition: VarEdgeInserterDynCore.h:51
ogdf::RemoveReinsertType
RemoveReinsertType
The postprocessing method for edge insertion algorithms.
Definition: RemoveReinsertType.h:41
Array.h
Declaration and implementation of Array class and Array algorithms.
ogdf::EdgeElement
Class for the representation of edges.
Definition: Graph_d.h:363
ogdf::VarEdgeInserterDynCore::m_pBC
BCandSPQRtrees * m_pBC
Definition: VarEdgeInserterDynCore.h:88
ogdf::Timeouter
class for timeout funtionality.
Definition: Timeouter.h:46
Module.h
Declares base class for all module types.
ogdf::VarEdgeInserterDynCore::~VarEdgeInserterDynCore
virtual ~VarEdgeInserterDynCore()
Definition: VarEdgeInserterDynCore.h:57
ogdf::VarEdgeInserterDynCore::m_pForbidden
const EdgeArray< bool > * m_pForbidden
Definition: VarEdgeInserterDynCore.h:85
ogdf::Module::ReturnType
ReturnType
The return type of a module.
Definition: Module.h:52
ogdf::NodeElement
Class for the representation of nodes.
Definition: Graph_d.h:240
ogdf::VarEdgeInserterDynCore::runsPostprocessing
int runsPostprocessing() const
Definition: VarEdgeInserterDynCore.h:62
ogdf::internal::EdgeArrayBase2
RegisteredArray for edges of a graph, specialized for EdgeArray<edge>.
Definition: Graph_d.h:716