All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
NeighborhoodUtility.h
Go to the documentation of this file.
1 /*
2  * NeighborhoodUtility.h
3  *
4  * Created on: 06.04.2015
5  * Author: Kolja Esders (kolja.esders@student.kit.edu)
6  */
7 
8 #ifndef NEIGHBORHOODUTILITY_H_
9 #define NEIGHBORHOODUTILITY_H_
10 
11 #include "../graph/Graph.h"
12 
13 namespace NetworKit {
14 
21 private:
29  static std::pair<std::vector<node>, std::vector<node>> getSortedNeighborhoods(const Graph& G, node u, node v);
30 
31 public:
39  static std::vector<node> getNeighborsUnion(const Graph& G, node u, node v);
40 
48  static std::vector<node> getCommonNeighbors(const Graph& G, node u, node v);
49 
50 };
51 
52 } // namespace NetworKit
53 
54 #endif /* NEIGHBORHOODUTILITY_H_ */
index node
Definition: Globals.h:23
static std::vector< node > getNeighborsUnion(const Graph &G, node u, node v)
Returns the union of the neighboorhoods of u and v.
Definition: NeighborhoodUtility.cpp:22
static std::vector< node > getCommonNeighbors(const Graph &G, node u, node v)
Returns a vector containing the node-ids of all common neighbors of u and v.
Definition: NeighborhoodUtility.cpp:33
A graph (with optional weights) and parallel iterator methods.
Definition: Graph.h:79
Provides basic operations on neighborhoods in a given graph.
Definition: NeighborhoodUtility.h:20