AdamicAdarDistance.h
Go to the documentation of this file.
1 /*
2  * AdamicAdarDistance.h
3  *
4  * Created on: 18.11.2014
5  * Author: Michael Hamann, Gerd Lindner
6  */
7
8 #ifndef ADAMICADARDISTANCE_H_
9 #define ADAMICADARDISTANCE_H_
10
11 #include "../graph/Graph.h"
12 #include "NodeDistance.h"
13
14 namespace NetworKit {
15
21
22 protected:
23  std::vector<double> aaDistance; //result vector
24
25  void removeNode(Graph& graph, node u);
26
27 public:
28
32  AdamicAdarDistance(const Graph& G);
33
38  virtual void preprocess();
39
44  virtual double distance(node u, node v);
45
50  virtual std::vector<double> getEdgeScores();
51
52 };
53
54 } /* namespace NetworKit */
55
56 #endif /* ADAMICADARDISTANCE_H_ */
const Graph & G
Definition: NodeDistance.h:23
std::vector< double > aaDistance
Definition: AdamicAdarDistance.h:23
virtual void preprocess()
Computes the Adamic Adar distances of all connected pairs of nodes.
Definition: AdamicAdarDistance.cpp:17
virtual double distance(node u, node v)
Returns the Adamic Adar distance between node u and node v.
Definition: AdamicAdarDistance.cpp:60
AdamicAdarDistance(const Graph &G)
Definition: AdamicAdarDistance.cpp:14
index node
Definition: Globals.h:23
Abstract base class for node distance measures.
Definition: NodeDistance.h:19
An implementation of the Adamic Adar distance measure.
Definition: AdamicAdarDistance.h:20
virtual std::vector< double > getEdgeScores()
Returns the Adamic Adar distances between all connected nodes.
Definition: AdamicAdarDistance.cpp:66
A graph (with optional weights) and parallel iterator methods.
Definition: Graph.h:79
void removeNode(Graph &graph, node u)
Definition: AdamicAdarDistance.cpp:70