Open
Graph Drawing
Framework

 v. 2022.02 (Dogwood)
 

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  // destruction
58  virtual ~AugmentationModule() { }
59 
61  void call(Graph& G) {
62  List<edge> L;
63  call(G,L);
64  }
65 
67  void operator()(Graph& G) { call(G); }
68 
74  void call(Graph& G, List<edge> &L) {
75  doCall(G,L);
76  m_nAddedEdges = L.size();
77  }
78 
84  void operator()(Graph& G, List<edge> &L) { call(G,L); }
85 
87  int numberOfAddedEdges() const {
88  return m_nAddedEdges;
89  }
90 
91 protected:
97  virtual void doCall(Graph& G, List<edge> &L) = 0;
98 
99 private:
101 
103 };
104 
105 }
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:58
ogdf::AugmentationModule::numberOfAddedEdges
int numberOfAddedEdges() const
Returns the number of added edges.
Definition: AugmentationModule.h:87
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:67
ogdf::List< edge >
ogdf::Graph
Data type for general directed graphs (adjacency list representation).
Definition: Graph_d.h:495
ogdf::AugmentationModule
The base class for graph augmentation algorithms.
Definition: AugmentationModule.h:53
ogdf::AugmentationModule::m_nAddedEdges
int m_nAddedEdges
Definition: AugmentationModule.h:100
ogdf::AugmentationModule::operator()
void operator()(Graph &G, List< edge > &L)
Calls the augmentation module for graph G.
Definition: AugmentationModule.h:84
OGDF_EXPORT
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:99
ogdf::List::size
int size() const
Returns the number of elements in the list.
Definition: List.h:1313
ogdf::AugmentationModule::call
void call(Graph &G, List< edge > &L)
Calls the augmentation module for graph G.
Definition: AugmentationModule.h:74
ogdf::AugmentationModule::call
void call(Graph &G)
Calls the augmentation module for graph G.
Definition: AugmentationModule.h:61