All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Namespaces | Functions
GraphTools.cpp File Reference
#include "GraphTools.h"
#include <unordered_map>
#include "../graph/Graph.h"
#include <random>

Namespaces

 NetworKit
 
 NetworKit::GraphTools
 

Functions

Graph NetworKit::GraphTools::getCompactedGraph (const Graph &graph, std::unordered_map< node, node > &nodeIdMap)
 Computes a graph with the same structure but with continuous node ids. More...
 
std::unordered_map< node, node > NetworKit::GraphTools::getContinuousNodeIds (const Graph &graph)
 Computes a map of node ids. More...
 
std::unordered_map< node, node > NetworKit::GraphTools::getRandomContinuousNodeIds (const Graph &graph)
 Computes a map of random node ids. More...
 
std::vector< node > NetworKit::GraphTools::invertContinuousNodeIds (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. More...
 
Graph NetworKit::GraphTools::restoreGraph (std::vector< node > &invertedIdMap, const Graph &G)
 Constructs a new graph that has the same node ids as before it was compacted. More...