ModErn Text Analysis
META Enumerates Textual Applications
centrality.h
Go to the documentation of this file.
1 
10 #ifndef META_GRAPH_ALGORITHMS_CENTRALITY_H_
11 #define META_GRAPH_ALGORITHMS_CENTRALITY_H_
12 
13 #include <mutex>
14 #include "graph/undirected_graph.h"
15 #include "graph/directed_graph.h"
16 
17 #include <vector>
18 
19 namespace meta
20 {
21 namespace graph
22 {
23 namespace algorithms
24 {
25 using centrality_result = std::vector<std::pair<node_id, double>>;
26 
33 template <class Graph>
34 centrality_result degree_centrality(const Graph& g);
35 
44 template <class Graph>
45 centrality_result betweenness_centrality(const Graph& g);
46 
54 template <class Graph>
55 centrality_result eigenvector_centrality(const Graph& g,
56  uint64_t max_iters = 100);
57 
61 namespace internal
62 {
66 template <class Graph>
67 void betweenness_step(const Graph& g, centrality_result& cb, node_id n,
68  std::mutex& calc_mut);
69 }
70 }
71 }
72 }
73 
75 #endif
void betweenness_step(const Graph &g, centrality_result &cb, node_id n, std::mutex &calc_mut)
Helper function for betweenness_centrality.
Definition: centrality.tcc:101
The ModErn Text Analysis toolkit is a suite of natural language processing, classification, information retreival, data mining, and other applications of text processing.
Definition: analyzer.h:24