All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AlgebraicDistanceIndex.h
Go to the documentation of this file.
1 /*
2  * AlgebraicDistanceIndex.h
3  *
4  * Created on: 19.06.2013
5  * Authors: cls, Kolja Esders
6  */
7 
8 #ifndef ALGEBRAICDISTANCEINDEX_H_
9 #define ALGEBRAICDISTANCEINDEX_H_
10 
11 #include "LinkPredictor.h"
12 #include "../graph/Graph.h"
13 #include "../auxiliary/Timer.h"
14 
15 
16 namespace NetworKit {
17 
25 private:
26 
34  double runImpl(node u, node v) override;
35 
36 protected:
39  double omega;
41  const index MAX_NORM = 0;
42 
43  std::vector<std::vector<double> > loads;
44 
45  void randomInit();
46 
47 public:
48  explicit AlgebraicDistanceIndex(count numberSystems, count numberIterations, double omega = 0.5, index norm = 2);
49 
57  explicit AlgebraicDistanceIndex(const Graph& G, count numberSystems, count numberIterations, double omega = 0.5, index norm = 2);
58 
66  virtual void preprocess();
67 
68 };
69 
70 } /* namespace NetworKit */
71 #endif /* ALGEBRAICDISTANCEINDEX_H_ */
Algebraic distance assigns a distance value to pairs of nodes according to their structural closeness...
Definition: AlgebraicDistanceIndex.h:24
std::vector< std::vector< double > > loads
loads[i]: vector of loads of length n for one system
Definition: AlgebraicDistanceIndex.h:43
uint64_t index
Typedefs.
Definition: Globals.h:20
count numIters
number of iterations in each system
Definition: AlgebraicDistanceIndex.h:38
virtual void preprocess()
Starting with random initialization, compute for all numberSystems "diffusion" systems the situation ...
Definition: AlgebraicDistanceIndex.cpp:21
index norm
Definition: AlgebraicDistanceIndex.h:40
uint64_t count
Definition: Globals.h:21
const index MAX_NORM
Definition: AlgebraicDistanceIndex.h:41
index node
Definition: Globals.h:23
count numSystems
number of vectors/systems used for algebraic iteration
Definition: AlgebraicDistanceIndex.h:37
void randomInit()
Definition: AlgebraicDistanceIndex.cpp:76
double omega
Definition: AlgebraicDistanceIndex.h:39
A graph (with optional weights) and parallel iterator methods.
Definition: Graph.h:79
AlgebraicDistanceIndex(count numberSystems, count numberIterations, double omega=0.5, index norm=2)
Definition: AlgebraicDistanceIndex.cpp:15