Function NetworKit::GraphTools::sortEdgesByWeight

Function Documentation

void NetworKit::GraphTools::sortEdgesByWeight(Graph &G, bool decreasing = false)

Sorts the adjacency arrays by increasing or decreasing edge weight. Edge ids are used to break ties.

Parameters:
  • G – The input graph.

  • decreasing – If true the adjacency arrays are sorted by non-increasing edge weights, if false, the adjacency arrays are sorted by non-decreasing edge weights. Ties are broken by using node ids.