Class NeighborhoodFunctionHeuristic

Inheritance Relationships

Base Type

Class Documentation

class NeighborhoodFunctionHeuristic : public NetworKit::Algorithm

Public Types

enum SelectionStrategy

Values:

enumerator RANDOM
enumerator SPLIT

Public Functions

NeighborhoodFunctionHeuristic(const Graph &G, count nSamples = 0, 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:
  • G – the given graph

  • nSamples – the amount of samples, set to zero for heuristic of max(sqrt(m), 0.15*n)

  • strategy – the strategy to select the samples, accepts “random” or “split”

virtual void run() override

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

const std::vector<count> &getNeighborhoodFunction() const

Returns the approximated neighborhood function of the graph.

Returns:

the approximated neighborhood function of the graph