Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
UpwardEdgeInserterModule.h
Go to the documentation of this file.
1
32#pragma once
33
34#include <ogdf/basic/Graph.h>
35#include <ogdf/basic/Module.h>
36#include <ogdf/basic/basic.h>
37#include <ogdf/basic/memory.h>
38
39namespace ogdf {
40class UpwardPlanRep;
41template<class E>
42class List;
43
45public:
48
49 // destruction
51
60 ReturnType call(UpwardPlanRep& UPR, const List<edge>& origEdges) {
61 return doCall(UPR, origEdges, nullptr, nullptr);
62 }
63
74 ReturnType call(UpwardPlanRep& UPR, const EdgeArray<int>& costOrig, const List<edge>& origEdges) {
75 return doCall(UPR, origEdges, &costOrig, nullptr);
76 }
77
90 const EdgeArray<bool>& forbidOriginal, const List<edge>& origEdges) {
91 return doCall(UPR, origEdges, &costOrig, &forbidOriginal);
92 }
93
106 ReturnType call(UpwardPlanRep& UPR, const EdgeArray<bool>& forbidOriginal,
107 const List<edge>& origEdges) {
108 return doCall(UPR, origEdges, nullptr, &forbidOriginal);
109 }
110
111protected:
123 virtual ReturnType doCall(UpwardPlanRep& UPR, const List<edge>& origEdges,
124 const EdgeArray<int>* costOrig, const EdgeArray<bool>* forbiddenEdgeOrig) = 0;
125
127};
128
129}
Includes declaration of graph class.
Declares base class for all module types.
Basic declarations, included by all source files.
Doubly linked lists (maintaining the length of the list).
Definition List.h:1451
Base class for modules.
Definition Module.h:49
ReturnType
The return type of a module.
Definition Module.h:52
virtual ReturnType doCall(UpwardPlanRep &UPR, const List< edge > &origEdges, const EdgeArray< int > *costOrig, const EdgeArray< bool > *forbiddenEdgeOrig)=0
Actual algorithm call that has to be implemented by derived classes.
ReturnType call(UpwardPlanRep &UPR, const List< edge > &origEdges)
Inserts all edges in origEdges into UPR.
ReturnType call(UpwardPlanRep &UPR, const EdgeArray< int > &costOrig, const List< edge > &origEdges)
Inserts all edges in origEdges with given costs into UPR.
UpwardEdgeInserterModule()
Initializes an edge insertion module.
ReturnType call(UpwardPlanRep &UPR, const EdgeArray< int > &costOrig, const EdgeArray< bool > &forbidOriginal, const List< edge > &origEdges)
Inserts all edges in origEdges with given forbidden edges into UPR.
ReturnType call(UpwardPlanRep &UPR, const EdgeArray< bool > &forbidOriginal, const List< edge > &origEdges)
Inserts all edges in origEdges with given forbidden edges into UPR.
Upward planarized representations (of a connected component) of a graph.
RegisteredArray for edges of a graph, specialized for EdgeArray<edge>.
Definition Graph_d.h:717
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF dynamic library (shared object / DLL),...
Definition config.h:117
#define OGDF_MALLOC_NEW_DELETE
Makes the class use malloc for memory allocation.
Definition memory.h:92
Declaration of memory manager for allocating small pieces of memory.
The namespace for all OGDF objects.