Open
Graph Drawing
Framework

 v. snapshot-2017-02-16
 

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 } // end namespace ogdf
void operator()(Graph &G)
Calls the augmentation module for graph G.
Data type for general directed graphs (adjacency list representation).
Definition: Graph_d.h:472
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:99
#define OGDF_MALLOC_NEW_DELETE
Makes the class use malloc for memory allocation.
Definition: memory.h:91
void operator()(Graph &G, List< edge > &L)
Calls the augmentation module for graph G.
void call(Graph &G, List< edge > &L)
Calls the augmentation module for graph G.
void call(Graph &G)
Calls the augmentation module for graph G.
Includes declaration of graph class.
int size() const
Returns the number of elements in the list.
Definition: List.h:1255
int numberOfAddedEdges() const
Returns the number of added edges.
The base class for graph augmentation algorithms.
The namespace for all OGDF objects.
AugmentationModule()
Initializes an augmentation module.