NeighborhoodFunctionHeuristic.h
Go to the documentation of this file.
1 /*
2 * NeighborhoodFunctionHeuristic.h
3 *
4 * Author: Maximilian Vogel
5 */
6
7 #ifndef NEIGHBORHOODFUNCTIONHEURISTIC_H_
8 #define NEIGHBORHOODFUNCTIONHEURISTIC_H_
9
10 #include "../base/Algorithm.h"
11 #include "../graph/Graph.h"
12
13 namespace NetworKit {
14
19
20 public:
24  };
35  NeighborhoodFunctionHeuristic(const Graph& G, const count nSamples = 0, const SelectionStrategy strategy = SPLIT);
36
37  void run() override;
38
43  std::vector<count> getNeighborhoodFunction() const;
44
45 private:
46  const Graph& G;
47  const count nSamples;
48  const SelectionStrategy strategy;
49  std::vector<count> result;
50
51  /* selection schemes implemented as private functions */
52  std::vector<node> random(const Graph& G, count nSamples);
53  std::vector<node> split(const Graph& G, count nSamples);
54
55 };
56
57 } /* namespace NetworKit */
58
59
60 #endif /* NEIGHBORHOODFUNCTIONHEURISTIC_H_ */
Definition: NeighborhoodFunctionHeuristic.h:18
SelectionStrategy
Definition: NeighborhoodFunctionHeuristic.h:21
NeighborhoodFunctionHeuristic(const Graph &G, const count nSamples=0, const SelectionStrategy strategy=SPLIT)
Computes a heuristic of the neighborhood function.
Definition: NeighborhoodFunctionHeuristic.cpp:21
void run() override
The generic run method which calls runImpl() and takes care of setting to the appropriate value...
Definition: NeighborhoodFunctionHeuristic.cpp:35
std::vector< count > getNeighborhoodFunction() const
Returns the approximated neighborhood function of the graph.
Definition: NeighborhoodFunctionHeuristic.cpp:98
Definition: NeighborhoodFunctionHeuristic.h:23
uint64_t count
Definition: Globals.h:21
Definition: Algorithm.h:9
A graph (with optional weights) and parallel iterator methods.
Definition: Graph.h:79
Definition: NeighborhoodFunctionHeuristic.h:22