forked from Conedy/Conedy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstatisticsNetwork.h
84 lines (49 loc) · 1.68 KB
/
statisticsNetwork.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#ifndef __statisticsN
#define __statisticsN
#include "network.h"
#include "baseType.h"
#include "globals.h"
namespace conedy
{
//! Contains functions, which calculate network characteristics
class statisticsNetwork : public virtual network
{
public:
void printStatistics ();
void printNodeStatistics();
bool isConnected();
nodeDescriptor degree (nodeDescriptor v) { return node::theNodes[v]->degree(); }
double meanDegree() { return meanOutDegree();}
baseType meanInDegree ();
baseType meanOutDegree ();
int inDegree(nodeDescriptor n);
int outDegree(nodeDescriptor n);
baseType meanClustering();
void printStatistics ( string s );
void dijkstra( vector<baseType>& ret, nodeList vl, unsigned int v);
baseType meanPathLength();
// baseType meanDistanceMult();
void degreeCentrality ( string filename );
void closenessCentrality ( string filename );
void betweennessCentrality ( string filename );
baseType meanWeight();
unsigned int countEdges (edgeVirtual *e);
// void weightDistribution ( string fileName)
void inDegreeDistributionToFile ( string fileName );
void saveAdjacencyList(string fileName);
void saveGraphML(string fileName);
void saveAdjacencyMatrix (string fileName);
void loadGraphML(string fileName) { throw "loadGraphML is a stub !";}
void printAdjacencyList();
void outDegreeDistributionToFile ( string fileName );
double networkSize();
vector<unsigned int> inDegreeDistribution();
vector<int> outDegreeDistribution();
void print ( int s )
{
cout << s << flush; cout << ( char ) 8; if ( s > 9 ) cout << ( char ) 8;;
};
statisticsNetwork() {};
};
}
#endif