All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DynamicDGSParser.h
Go to the documentation of this file.
1 /*
2  * DynamicDGSParser.h
3  *
4  * Created on: Jun 17, 2013
5  * Author: forigem
6  */
7 
8 #ifndef DYNAMICDGSPARSER_H_
9 #define DYNAMICDGSPARSER_H_
10 
11 #include <fstream>
12 #include <vector>
13 #include <unordered_map>
14 #include <iterator>
15 #include <string>
16 
17 #include "DynamicGraphSource.h"
18 #include "../auxiliary/StringTools.h"
19 #include "../structures/Partition.h"
20 
21 
22 namespace NetworKit {
23 
28 public:
29  DynamicDGSParser(std::string path);
30 
34  virtual void initializeGraph();
35 
36 
40  virtual void generate();
41 
42  void evaluateClusterings(const std::string path, const Partition& clustering);
43 
44 
45 protected:
47  std::unordered_map<std::string, node> nodeNames;
48  std::vector<std::string> nodeDates;
49  std::ifstream dgsFile;
50  std::vector<std::vector<std::string>> nodeCategories;
51 
52 
53 };
54 
55 } /* namespace NetworKit */
56 #endif /* DYNAMICDGSPARSER_H_ */
std::unordered_map< std::string, node > nodeNames
Definition: DynamicDGSParser.h:47
void evaluateClusterings(const std::string path, const Partition &clustering)
Definition: DynamicDGSParser.cpp:144
std::vector< std::string > nodeDates
Definition: DynamicDGSParser.h:48
std::vector< std::vector< std::string > > nodeCategories
Definition: DynamicDGSParser.h:50
Definition: DynamicGraphSource.h:20
bool graphInitialized
true if initializeGraph has been called and graph has been properly initialized
Definition: DynamicDGSParser.h:46
Implements a partition of a set, i.e.
Definition: Partition.h:31
Definition: DynamicDGSParser.h:27
virtual void initializeGraph()
The generator may expect the graph to be in a certain initial state.
Definition: DynamicDGSParser.cpp:20
DynamicDGSParser(std::string path)
Definition: DynamicDGSParser.cpp:16
virtual void generate()
Perform one generative step - as defined by the implementation.
Definition: DynamicDGSParser.cpp:49
std::ifstream dgsFile
Definition: DynamicDGSParser.h:49