Function NetworKit::GraphTools::randomNodes

Function Documentation

std::vector<node> NetworKit::GraphTools::randomNodes(const Graph &G, count n)

Returns n distinct random nodes of the input graph.

Parameters:
  • G – The input graph.

  • n – The number of desired nodes.

Returns:

A vector of n distinct random nodes.