All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
EffectiveDiameter.h
Go to the documentation of this file.
1 /*
2 * EffectiveDiameter.h
3 *
4 * Created on: 16.06.2014
5 * Author: Marc Nemes
6 */
7 
8 #ifndef EFFECTIVEDIAMETER_H_
9 #define EFFECTIVEDIAMETER_H_
10 
11 #include "../base/Algorithm.h"
12 #include "../graph/Graph.h"
13 
14 namespace NetworKit {
15 
19 class EffectiveDiameter : public Algorithm {
20 
21 public:
28  EffectiveDiameter(const Graph& G, const double ratio=0.9);
29 
30  void run() override;
31 
36  double getEffectiveDiameter() const;
37 
38 private:
39  const Graph& G;
40  const double ratio;
41  double effectiveDiameter;
42 };
43 
44 } /* namespace NetworKit */
45 
46 #endif /* EFFECTIVEDIAMETER_H_ */
Definition: EffectiveDiameter.h:19
double getEffectiveDiameter() const
Returns the exact effective diameter of the graph.
Definition: EffectiveDiameter.cpp:90
EffectiveDiameter(const Graph &G, const double ratio=0.9)
Computes the effective diameter exactly.
Definition: EffectiveDiameter.cpp:20
Definition: Algorithm.h:9
A graph (with optional weights) and parallel iterator methods.
Definition: Graph.h:79
void run() override
The generic run method which calls runImpl() and takes care of setting to the appropriate value...
Definition: EffectiveDiameter.cpp:27