Class GraphCoarsening

Inheritance Relationships

Base Type

Derived Types

Class Documentation

class GraphCoarsening : public NetworKit::Algorithm

Abstract base class for graph coarsening/contraction algorithms.

Subclassed by NetworKit::AlgebraicMatchingCoarsening< Matrix >, NetworKit::MatchingCoarsening, NetworKit::ParallelPartitionCoarsening

Public Functions

GraphCoarsening(const Graph &G)
~GraphCoarsening() override = default
virtual void run() override = 0

The generic run method which calls runImpl() and takes care of setting hasRun to the appropriate value.

const Graph &getCoarseGraph() const
Graph &getCoarseGraph()
const std::vector<node> &getFineToCoarseNodeMapping() const

Get mapping from fine to coarse node.

std::vector<node> &getFineToCoarseNodeMapping()
std::map<node, std::vector<node>> getCoarseToFineNodeMapping() const

Get mapping from coarse node to collection of fine nodes.

Protected Attributes

const Graph *G
Graph Gcoarsened
std::vector<node> nodeMapping