All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SpanningEdgeCentrality.h
Go to the documentation of this file.
1 /*
2  * SpanningEdgeCentrality.h
3  *
4  * Created on: 29.07.2015
5  * Author: henningm
6  */
7 
8 #ifndef SPANNING_H_
9 #define SPANNING_H_
10 
11 #include "Centrality.h"
12 #include "../numerics/LAMG/Lamg.h"
13 #include "../algebraic/CSRMatrix.h"
14 
15 
16 namespace NetworKit {
17 
25 protected:
26  double tol;
28  uint64_t setupTime;
29 
30 public:
36  SpanningEdgeCentrality(const Graph& G, double tol = 0.1);
37 
41  virtual ~SpanningEdgeCentrality() = default;
42 
43 
48  void run() override;
49 
50 
55  void runApproximation();
56 
61 
69  uint64_t runApproximationAndWriteVectors(const std::string &graphPath);
70 
74  uint64_t getSetupTime() const;
80  double runForEdge(node u, node v);
81 
82 };
83 
84 } /* namespace NetworKit */
85 
86 
87 #endif /* SPANNING_H_ */
SpanningEdgeCentrality(const Graph &G, double tol=0.1)
Constructs the SpanningEdgeCentrality class for the given Graph G.
Definition: SpanningEdgeCentrality.cpp:20
virtual ~SpanningEdgeCentrality()=default
Destructor.
SpanningEdgeCentrality edge centrality.
Definition: SpanningEdgeCentrality.h:24
uint64_t getSetupTime() const
Definition: SpanningEdgeCentrality.cpp:63
void run() override
Compute spanning edge centrality scores exactly for all edges.
Definition: SpanningEdgeCentrality.cpp:33
const Graph & G
Definition: Centrality.h:91
void runParallelApproximation()
Compute approximation by JL projection in parallel.
Definition: SpanningEdgeCentrality.cpp:106
uint64_t runApproximationAndWriteVectors(const std::string &graphPath)
Only used by benchmarking.
Definition: SpanningEdgeCentrality.cpp:147
Abstract base class for centrality measures.
Definition: Centrality.h:20
index node
Definition: Globals.h:23
uint64_t setupTime
Definition: SpanningEdgeCentrality.h:28
double runForEdge(node u, node v)
Compute value for one edge only.
Definition: SpanningEdgeCentrality.cpp:190
Represents the interface to the Lean Algebraic Multigrid (LAMG) graph Laplacian linear solver by Oren...
Definition: Lamg.h:30
double tol
Definition: SpanningEdgeCentrality.h:26
void runApproximation()
Compute approximation by JL projection.
Definition: SpanningEdgeCentrality.cpp:67
A graph (with optional weights) and parallel iterator methods.
Definition: Graph.h:79
Lamg< CSRMatrix > lamg
Definition: SpanningEdgeCentrality.h:27