# OpenGraph DrawingFramework

v. 2023.09 (Elderberry)

Searching...
No Matches
AugmentationModule.h
Go to the documentation of this file.
1
32#pragma once
33
34#include <ogdf/basic/Graph.h>
35
36namespace ogdf {
37
54public:
56 AugmentationModule() : m_nAddedEdges(0) { }
57
58 // destruction
59 virtual ~AugmentationModule() { }
60
62 void call(Graph& G) {
64 call(G, L);
65 }
66
68 void operator()(Graph& G) { call(G); }
69
75 void call(Graph& G, List<edge>& L) {
76 doCall(G, L);
77 m_nAddedEdges = L.size();
78 }
79
85 void operator()(Graph& G, List<edge>& L) { call(G, L); }
86
88 int numberOfAddedEdges() const { return m_nAddedEdges; }
89
90protected:
96 virtual void doCall(Graph& G, List<edge>& L) = 0;
97
98private:
100
102};
103
104}
Includes declaration of graph class.
The base class for graph augmentation algorithms.
void operator()(Graph &G, List< edge > &L)
Calls the augmentation module for graph G.
Returns the number of added edges.
void call(Graph &G, List< edge > &L)
Calls the augmentation module for graph G.
void operator()(Graph &G)
Calls the augmentation module for graph G.
virtual void doCall(Graph &G, List< edge > &L)=0
Implements the augmentation algorithm for graph G.
AugmentationModule()
Initializes an augmentation module.
void call(Graph &G)
Calls the augmentation module for graph G.
Data type for general directed graphs (adjacency list representation).
Definition Graph_d.h:521
Doubly linked lists (maintaining the length of the list).
Definition List.h:1435
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition config.h:101
#define OGDF_MALLOC_NEW_DELETE
Makes the class use malloc for memory allocation.
Definition memory.h:91
static MultilevelBuilder * getDoubleFactoredZeroAdjustedMerger()
The namespace for all OGDF objects.