Function NetworKit::GraphTools::randomEdges

Function Documentation

std::vector<std::pair<node, node>> NetworKit::GraphTools::randomEdges(const Graph &G, count nr)

Returns a vector with nr random edges. The edges are chosen uniformly random.

Parameters:
  • G – The input graph.

  • nr – The number of random edges to be returned.

Returns:

std::vector<std::pair<node, node>> Vector with random edges.