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

#include <NeighborhoodFunctionApproximation.h>

Public Member Functions

 NeighborhoodFunctionApproximation (const Graph &G, const count k=64, const count r=7)
 Computes an approximation of the neighborhood function. More...
 
void run () override
 The generic run method which calls runImpl() and takes care of setting to the appropriate value. More...
 
std::vector< countgetNeighborhoodFunction () const
 Returns the approximated neighborhood function 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::NeighborhoodFunctionApproximation::NeighborhoodFunctionApproximation ( const Graph G,
const count  k = 64,
const count  r = 7 
)

Computes an approximation of the neighborhood function.

The neighborhood function N of a graph G for a given distance t is defined as the number of node pairs (u,v) that can be reached within distance t. 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
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

std::vector< count > NetworKit::NeighborhoodFunctionApproximation::getNeighborhoodFunction ( ) const

Returns the approximated neighborhood function of the graph.

Returns
the approximated neighborhood function of the graph
void NetworKit::NeighborhoodFunctionApproximation::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: