Function NetworKit::GraphTools::invertContinuousNodeIds

Function Documentation

std::vector<node> NetworKit::GraphTools::invertContinuousNodeIds(const std::unordered_map<node, node> &nodeIdMap, const Graph &G)

Inverts a given mapping of node ids from a graph with deleted nodes to continuous node ids.

Parameters:
  • nodeIdMap – The mapping from node ids with gaps to continuous node ids (i.e. from @getContinuousNodeIds)

  • G – The compacted graph (currently only needed for the upper node id bound)

Returns:

A vector of nodes id where the index is the node id of the compacted graph and the value is the node id of the noncontinuous graph.