All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
NetworKit::EffectiveDiameterApproximation Class Reference

#include <EffectiveDiameterApproximation.h>

Public Member Functions

 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. More...
 
void run () override
 The generic run method which calls runImpl() and takes care of setting to the appropriate value. More...
 
double getEffectiveDiameter () const
 Returns the exact effective diameter of the graph. More...
 
- Public Member Functions inherited from NetworKit::Algorithm
 Algorithm ()
 Constructor to the algorithm base class. More...
 
virtual ~Algorithm ()=default
 Virtual default destructor. More...
 
bool hasFinished () const
 Indicates whether an algorithm has completed computation or not. More...
 
void assureFinished () const
 Assure that the algorithm has been run, throws a std::runtime_error otherwise. More...
 
virtual std::string toString () const
 Returns a string with the algorithm's name and its parameters, if there are any. More...
 
virtual bool isParallel () const
 

Additional Inherited Members

- Protected Attributes inherited from NetworKit::Algorithm
bool hasRun
 A boolean variable indicating whether an algorithm has finished its computation or not. More...
 

Constructor & Destructor Documentation

NetworKit::EffectiveDiameterApproximation::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.

The effective diameter is defined as the number of edges on average to reach ratio of all other nodes. Implementation after the ANF algorithm presented in the paper "A Fast and Scalable Tool for Data Mining in Massive Graphs"[1]

[1] by Palmer, Gibbons and Faloutsos which can be found here: http://www.cs.cmu.edu/~christos/PUBLICATIONS/kdd02-anf.pdf

Parameters
Gthe given graph
ratiothe ratio of nodes that should be connected (0,1]; default = 0.9
kthe number of parallel approximations to get a more robust result; default = 64
rthe amount of bits that are added to the length of the bitmask to improve the accuracy; default = 7

Member Function Documentation

double NetworKit::EffectiveDiameterApproximation::getEffectiveDiameter ( ) const

Returns the exact effective diameter of the graph.

Returns
the exact effective diameter of the graph
void NetworKit::EffectiveDiameterApproximation::run ( )
overridevirtual

The generic run method which calls runImpl() and takes care of setting to the appropriate value.

Implements NetworKit::Algorithm.


The documentation for this class was generated from the following files: