All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
NodeDistance.h
Go to the documentation of this file.
1 /*
2  * NodeDistance.h
3  *
4  * Created on: 18.06.2013
5  * Author: cls
6  */
7 
8 #ifndef NODEDISTANCE_H_
9 #define NODEDISTANCE_H_
10 
11 #include "../graph/Graph.h"
12 
13 namespace NetworKit {
14 
19 class NodeDistance {
20 
21 protected:
22 
23  const Graph& G;
24 
25 public:
31  NodeDistance(const Graph& G);
32 
34  virtual ~NodeDistance() = default;
35 
39  virtual void preprocess() = 0;
40 
45  virtual double distance(node u, node v) = 0;
46 
51  virtual std::vector<double> getEdgeScores() = 0;
52 };
53 
54 } /* namespace NetworKit */
55 #endif /* NODEDISTANCE_H_ */
const Graph & G
Definition: NodeDistance.h:23
virtual std::vector< double > getEdgeScores()=0
Returns the distances between all connected pairs of nodes.
virtual double distance(node u, node v)=0
Return the distance between two nodes.
virtual ~NodeDistance()=default
Default destructor.
index node
Definition: Globals.h:23
Abstract base class for node distance measures.
Definition: NodeDistance.h:19
A graph (with optional weights) and parallel iterator methods.
Definition: Graph.h:79
virtual void preprocess()=0
Perform preprocessing work.
NodeDistance(const Graph &G)
Constructs the NodeDistance class for the given Graph G.
Definition: NodeDistance.cpp:12