Function NetworKit::GraphTools::getCompactedGraph

Function Documentation

Graph NetworKit::GraphTools::getCompactedGraph(const Graph &graph, const std::unordered_map<node, node> &nodeIdMap)

Computes a graph with the same structure but with continuous node ids.

Parameters:
  • graph – The graph to be compacted.

  • nodeIdMap – The map providing the information about the node ids.

Returns:

Returns a compacted Graph.