Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

AugmentationModule.h
Go to the documentation of this file.
1 
32 #pragma once
33 
34 #include <ogdf/basic/Graph.h>
35 
36 namespace ogdf {
37 
54 public:
56  AugmentationModule() : m_nAddedEdges(0) { }
57 
58  // destruction
59  virtual ~AugmentationModule() { }
60 
62  void call(Graph& G) {
63  List<edge> L;
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 
90 protected:
96  virtual void doCall(Graph& G, List<edge>& L) = 0;
97 
98 private:
100 
102 };
103 
104 }
ogdf
The namespace for all OGDF objects.
Definition: AugmentationModule.h:36
Graph.h
Includes declaration of graph class.
ogdf::AugmentationModule::~AugmentationModule
virtual ~AugmentationModule()
Definition: AugmentationModule.h:59
ogdf::AugmentationModule::numberOfAddedEdges
int numberOfAddedEdges() const
Returns the number of added edges.
Definition: AugmentationModule.h:88
ogdf::AugmentationModule::AugmentationModule
AugmentationModule()
Initializes an augmentation module.
Definition: AugmentationModule.h:56
OGDF_MALLOC_NEW_DELETE
#define OGDF_MALLOC_NEW_DELETE
Makes the class use malloc for memory allocation.
Definition: memory.h:91
ogdf::AugmentationModule::operator()
void operator()(Graph &G)
Calls the augmentation module for graph G.
Definition: AugmentationModule.h:68
ogdf::List< edge >
ogdf::Graph
Data type for general directed graphs (adjacency list representation).
Definition: Graph_d.h:862
ogdf::AugmentationModule
The base class for graph augmentation algorithms.
Definition: AugmentationModule.h:53
ogdf::AugmentationModule::m_nAddedEdges
int m_nAddedEdges
Definition: AugmentationModule.h:99
ogdf::AugmentationModule::operator()
void operator()(Graph &G, List< edge > &L)
Calls the augmentation module for graph G.
Definition: AugmentationModule.h:85
OGDF_EXPORT
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:101
ogdf::List::size
int size() const
Returns the number of elements in the list.
Definition: List.h:1478
ogdf::AugmentationModule::call
void call(Graph &G, List< edge > &L)
Calls the augmentation module for graph G.
Definition: AugmentationModule.h:75
ogdf::AugmentationModule::call
void call(Graph &G)
Calls the augmentation module for graph G.
Definition: AugmentationModule.h:62