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

#include <NeighborhoodFunctionHeuristic.h>

Public Types

enum  SelectionStrategy { RANDOM, SPLIT }
 

Public Member Functions

 NeighborhoodFunctionHeuristic (const Graph &G, const count nSamples=0, const SelectionStrategy strategy=SPLIT)
 Computes a heuristic 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...
 

Member Enumeration Documentation

Enumerator
RANDOM 
SPLIT 

Constructor & Destructor Documentation

NetworKit::NeighborhoodFunctionHeuristic::NeighborhoodFunctionHeuristic ( const Graph G,
const count  nSamples = 0,
const SelectionStrategy  strategy = SPLIT 
)

Computes a heuristic of the neighborhood function.

The algorithm runs nSamples breadth-first searches and scales the results up to the actual amount of nodes. Accepted strategies are "split" and "random".

Parameters
Gthe given graph
nSamplesthe amount of samples, set to zero for heuristic of max(sqrt(m), 0.15*n)
strategythe strategy to select the samples, accepts "random" or "split"

Member Function Documentation

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

Returns the approximated neighborhood function of the graph.

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