All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
EffectiveDiameterApproximation.h
Go to the documentation of this file.
1 /*
2 * EffectiveDiameterApproximation.h
3 *
4 * Created on: 29.03.16
5 * Author: Maximilian Vogel
6 */
7 
8 #ifndef EFFECTIVEDIAMETERAPPROXIMATION_H_
9 #define EFFECTIVEDIAMETERAPPROXIMATION_H_
10 
11 #include "../graph/Graph.h"
12 #include "../base/Algorithm.h"
13 
14 namespace NetworKit {
15 
20 
21 public:
34  EffectiveDiameterApproximation(const Graph& G, const double ratio=0.9, const count k=64, const count r=7);
35 
36  void run() override;
37 
42  double getEffectiveDiameter() const;
43 
44 private:
45  const Graph& G;
46  const double ratio;
47  const count k;
48  const count r;
49  double effectiveDiameter;
50 };
51 
52 } /* namespace NetworKit */
53 
54 #endif /* EFFECTIVEDIAMETERAPPROXIMATION_H_ */
double getEffectiveDiameter() const
Returns the exact effective diameter of the graph.
Definition: EffectiveDiameterApproximation.cpp:115
EffectiveDiameterApproximation(const Graph &G, const double ratio=0.9, const count k=64, const count r=7)
Approximates the effective diameter of a given graph.
Definition: EffectiveDiameterApproximation.cpp:6
uint64_t count
Definition: Globals.h:21
Definition: EffectiveDiameterApproximation.h:19
Definition: Algorithm.h:9
void run() override
The generic run method which calls runImpl() and takes care of setting to the appropriate value...
Definition: EffectiveDiameterApproximation.cpp:13
A graph (with optional weights) and parallel iterator methods.
Definition: Graph.h:79