Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

EdgeInsertionModule.h
Go to the documentation of this file.
1 
32 #pragma once
33 
34 #include <ogdf/basic/Array.h>
35 #include <ogdf/basic/Graph.h>
36 #include <ogdf/basic/Module.h>
37 #include <ogdf/basic/Timeouter.h>
38 #include <ogdf/basic/basic.h>
39 #include <ogdf/basic/memory.h>
40 
41 #include <cstdint>
42 
43 namespace ogdf {
44 class PlanRepLight;
45 
47 
51 public:
54 
57 
59  virtual ~EdgeInsertionModule() { }
60 
62  virtual EdgeInsertionModule* clone() const = 0;
63 
65 
71  ReturnType call(PlanRepLight& pr, const Array<edge>& origEdges) {
72  return doCall(pr, origEdges, nullptr, nullptr, nullptr);
73  }
74 
76 
84  ReturnType call(PlanRepLight& pr, const EdgeArray<int>& costOrig, const Array<edge>& origEdges) {
85  return doCall(pr, origEdges, &costOrig, nullptr, nullptr);
86  }
87 
89 
98  ReturnType call(PlanRepLight& pr, const EdgeArray<int>& costOrig, const Array<edge>& origEdges,
99  const EdgeArray<uint32_t>& edgeSubGraphs) {
100  return doCall(pr, origEdges, &costOrig, nullptr, &edgeSubGraphs);
101  }
102 
104 
113  ReturnType call(PlanRepLight& pr, const EdgeArray<bool>& forbiddenOrig,
114  const Array<edge>& origEdges) {
115  return doCall(pr, origEdges, nullptr, &forbiddenOrig, nullptr);
116  }
117 
119 
131  const EdgeArray<bool>& forbiddenOrig, const Array<edge>& origEdges) {
132  return doCall(pr, origEdges, &costOrig, &forbiddenOrig, nullptr);
133  }
134 
136 
149  const EdgeArray<bool>& forbiddenOrig, const Array<edge>& origEdges,
150  const EdgeArray<uint32_t>& edgeSubGraphs) {
151  return doCall(pr, origEdges, &costOrig, &forbiddenOrig, &edgeSubGraphs);
152  }
153 
155 
167  ReturnType callEx(PlanRepLight& pr, const Array<edge>& origEdges,
168  const EdgeArray<int>* pCostOrig = nullptr,
169  const EdgeArray<bool>* pForbiddenOrig = nullptr,
170  const EdgeArray<uint32_t>* pEdgeSubGraphs = nullptr) {
171  return doCall(pr, origEdges, pCostOrig, pForbiddenOrig, pEdgeSubGraphs);
172  }
173 
174 
175 protected:
177 
187  virtual ReturnType doCall(PlanRepLight& pr, const Array<edge>& origEdges,
188  const EdgeArray<int>* pCostOrig, const EdgeArray<bool>* pForbiddenOrig,
189  const EdgeArray<uint32_t>* pEdgeSubGraphs) = 0;
190 
191 
193 };
194 
195 }
ogdf
The namespace for all OGDF objects.
Definition: multilevelmixer.cpp:39
Graph.h
Includes declaration of graph class.
ogdf::EdgeInsertionModule::call
ReturnType call(PlanRepLight &pr, const EdgeArray< int > &costOrig, const EdgeArray< bool > &forbiddenOrig, const Array< edge > &origEdges)
Inserts all edges in origEdges with given costs and forbidden edges into pr.
Definition: EdgeInsertionModule.h:130
ogdf::EdgeInsertionModule::call
ReturnType call(PlanRepLight &pr, const EdgeArray< int > &costOrig, const Array< edge > &origEdges)
Inserts all edges in origEdges with given costs into pr.
Definition: EdgeInsertionModule.h:84
ogdf::PlanRepLight
Light-weight version of a planarized representation, associated with a PlanRep.
Definition: PlanRepLight.h:45
ogdf::EdgeInsertionModule
Interface for edge insertion algorithms.
Definition: EdgeInsertionModule.h:50
ogdf::EdgeInsertionModule::call
ReturnType call(PlanRepLight &pr, const EdgeArray< int > &costOrig, const Array< edge > &origEdges, const EdgeArray< uint32_t > &edgeSubGraphs)
Inserts all edges in origEdges with given costs and subgraphs (for simultaneous drawing) into pr.
Definition: EdgeInsertionModule.h:98
Timeouter.h
Declares base class for modules with timeout functionality.
ogdf::EdgeInsertionModule::call
ReturnType call(PlanRepLight &pr, const EdgeArray< int > &costOrig, const EdgeArray< bool > &forbiddenOrig, const Array< edge > &origEdges, const EdgeArray< uint32_t > &edgeSubGraphs)
Inserts all edges in origEdges with given costs, forbidden edges, and subgraphs (for simultaneous dra...
Definition: EdgeInsertionModule.h:148
OGDF_MALLOC_NEW_DELETE
#define OGDF_MALLOC_NEW_DELETE
Makes the class use malloc for memory allocation.
Definition: memory.h:92
ogdf::EdgeInsertionModule::call
ReturnType call(PlanRepLight &pr, const Array< edge > &origEdges)
Inserts all edges in origEdges into pr.
Definition: EdgeInsertionModule.h:71
ogdf::Module
Base class for modules.
Definition: Module.h:49
ogdf::Array
The parameterized class Array implements dynamic arrays of type E.
Definition: Array.h:219
ogdf::EdgeInsertionModule::callEx
ReturnType callEx(PlanRepLight &pr, const Array< edge > &origEdges, const EdgeArray< int > *pCostOrig=nullptr, const EdgeArray< bool > *pForbiddenOrig=nullptr, const EdgeArray< uint32_t > *pEdgeSubGraphs=nullptr)
Inserts all edges in origEdges into pr, optionally costs, forbidden edges, and subgraphs (for simulta...
Definition: EdgeInsertionModule.h:167
ogdf::EdgeInsertionModule::EdgeInsertionModule
EdgeInsertionModule()
Initializes an edge insertion module (default constructor).
Definition: EdgeInsertionModule.h:53
ogdf::EdgeInsertionModule::EdgeInsertionModule
EdgeInsertionModule(const EdgeInsertionModule &eim)
Initializes an edge insertion module (copy constructor).
Definition: EdgeInsertionModule.h:56
ogdf::EdgeInsertionModule::~EdgeInsertionModule
virtual ~EdgeInsertionModule()
Destructor.
Definition: EdgeInsertionModule.h:59
basic.h
Basic declarations, included by all source files.
ogdf::EdgeInsertionModule::call
ReturnType call(PlanRepLight &pr, const EdgeArray< bool > &forbiddenOrig, const Array< edge > &origEdges)
Inserts all edges in origEdges with given forbidden edges into pr.
Definition: EdgeInsertionModule.h:113
OGDF_EXPORT
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:101
Array.h
Declaration and implementation of Array class and Array algorithms.
ogdf::Timeouter
class for timeout funtionality.
Definition: Timeouter.h:46
Module.h
Declares base class for all module types.
ogdf::Module::ReturnType
ReturnType
The return type of a module.
Definition: Module.h:52
memory.h
Declaration of memory manager for allocating small pieces of memory.
ogdf::internal::EdgeArrayBase2
RegisteredArray for edges of a graph, specialized for EdgeArray<edge>.
Definition: Graph_d.h:716