All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DynamicPubWebGenerator.h
Go to the documentation of this file.
1 /*
2  * DynamicPubWebGenerator.h
3  *
4  * Created on: 15.01.2014
5  * Author: Henning
6  */
7 
8 #ifndef DYNAMICPUBWEBGENERATOR_H_
9 #define DYNAMICPUBWEBGENERATOR_H_
10 
11 #include <map>
12 
13 #include "DynamicGraphGenerator.h"
14 #include "PubWebGenerator.h"
15 #include "../dynamics/GraphEvent.h"
16 #include "../dynamics/DGSWriter.h"
17 #include "../auxiliary/Random.h"
18 #include "../viz/Point.h"
19 
20 namespace NetworKit {
21 
26 
27 protected:
28  PubWebGenerator initGen; // multiple inheritance did not work with different generate functions
29  std::map<node, Point<float> > coordinates; //<! new and changed coordinates
30  bool writeInitialGraphToStream; // if true, on first call, write initial graph to stream
31 
32 
33 public:
34  DynamicPubWebGenerator(count numNodes, count numberOfDenseAreas,
35  float neighborhoodRadius, count maxNumberOfNeighbors,
36  bool writeInitialGraphToStream = true);
37 
38 
39  Graph getGraph() const { return G; }
40 
46  virtual std::vector<GraphEvent> generate(count nSteps);
47 
48 
49  virtual std::map<node, Point<float> > getNewCoordinates() const;
50 
51 
52 
53 };
54 
55 } /* namespace NetworKit */
56 #endif /* DYNAMICPUBWEBGENERATOR_H_ */
virtual std::map< node, Point< float > > getNewCoordinates() const
Definition: DynamicPubWebGenerator.cpp:218
Generates a static graph that resembles an assumed geometric distribution of nodes in a P2P network...
Definition: PubWebGenerator.h:58
PubWebGenerator initGen
Definition: DynamicPubWebGenerator.h:28
Graph G
Definition: DynamicGraphGenerator.h:36
virtual std::vector< GraphEvent > generate(count nSteps)
Generate event stream.
Definition: DynamicPubWebGenerator.cpp:23
bool writeInitialGraphToStream
Definition: DynamicPubWebGenerator.h:30
uint64_t count
Definition: Globals.h:21
DynamicPubWebGenerator(count numNodes, count numberOfDenseAreas, float neighborhoodRadius, count maxNumberOfNeighbors, bool writeInitialGraphToStream=true)
Definition: DynamicPubWebGenerator.cpp:14
Abstract base class for a dynamic graph generator (in the new dynamic architecture).
Definition: DynamicGraphGenerator.h:21
A graph (with optional weights) and parallel iterator methods.
Definition: Graph.h:79
std::map< node, Point< float > > coordinates
Definition: DynamicPubWebGenerator.h:29
Graph getGraph() const
Definition: DynamicPubWebGenerator.h:39
Definition: DynamicPubWebGenerator.h:25