↰ Return to documentation for file (include/networkit/coarsening/GraphCoarsening.hpp
)
/*
* GraphCoarsening.hpp
*
* Created on: 30.10.2012
* Author: Christian Staudt (christian.staudt@kit.edu)
*/
#ifndef NETWORKIT_COARSENING_GRAPH_COARSENING_HPP_
#define NETWORKIT_COARSENING_GRAPH_COARSENING_HPP_
#include <map>
#include <vector>
#include <networkit/base/Algorithm.hpp>
#include <networkit/graph/Graph.hpp>
namespace NetworKit {
class GraphCoarsening : public Algorithm {
public:
GraphCoarsening(const Graph &G);
~GraphCoarsening() override = default;
void run() override = 0;
const Graph &getCoarseGraph() const;
Graph &getCoarseGraph();
const std::vector<node> &getFineToCoarseNodeMapping() const;
std::vector<node> &getFineToCoarseNodeMapping();
std::map<node, std::vector<node>> getCoarseToFineNodeMapping() const;
protected:
const Graph *G;
Graph Gcoarsened;
std::vector<node> nodeMapping;
};
} // namespace NetworKit
#endif // NETWORKIT_COARSENING_GRAPH_COARSENING_HPP_