All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Attributes | List of all members
NetworKit::GraphCoarsening Class Referenceabstract

Abstract base class for graph coarsening/contraction algorithms. More...

#include <GraphCoarsening.h>

Public Member Functions

 GraphCoarsening (const Graph &G)
 
virtual ~GraphCoarsening ()=default
 
virtual void run ()=0
 The generic run method which calls runImpl() and takes care of setting to the appropriate value. More...
 
Graph getCoarseGraph () const
 
std::vector< nodegetFineToCoarseNodeMapping () const
 Get mapping from fine to coarse node. More...
 
std::map< node, std::vector
< node > > 
getCoarseToFineNodeMapping () const
 Get mapping from coarse node to collection of fine nodes. More...
 
- Public Member Functions inherited from NetworKit::Algorithm
 Algorithm ()
 Constructor to the algorithm base class. More...
 
virtual ~Algorithm ()=default
 Virtual default destructor. More...
 
bool hasFinished () const
 Indicates whether an algorithm has completed computation or not. More...
 
void assureFinished () const
 Assure that the algorithm has been run, throws a std::runtime_error otherwise. More...
 
virtual std::string toString () const
 Returns a string with the algorithm's name and its parameters, if there are any. More...
 
virtual bool isParallel () const
 

Protected Attributes

const GraphG
 
Graph Gcoarsened
 
std::vector< nodenodeMapping
 
- Protected Attributes inherited from NetworKit::Algorithm
bool hasRun
 A boolean variable indicating whether an algorithm has finished its computation or not. More...
 

Detailed Description

Abstract base class for graph coarsening/contraction algorithms.

Constructor & Destructor Documentation

NetworKit::GraphCoarsening::GraphCoarsening ( const Graph G)
virtual NetworKit::GraphCoarsening::~GraphCoarsening ( )
virtualdefault

Member Function Documentation

Graph NetworKit::GraphCoarsening::getCoarseGraph ( ) const
std::map< node, std::vector< node > > NetworKit::GraphCoarsening::getCoarseToFineNodeMapping ( ) const

Get mapping from coarse node to collection of fine nodes.

std::vector< node > NetworKit::GraphCoarsening::getFineToCoarseNodeMapping ( ) const

Get mapping from fine to coarse node.

virtual void NetworKit::GraphCoarsening::run ( )
pure virtual

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

Implements NetworKit::Algorithm.

Implemented in NetworKit::AlgebraicMatchingCoarsening< Matrix >, NetworKit::MatchingCoarsening, and NetworKit::ParallelPartitionCoarsening.

Member Data Documentation

const Graph& NetworKit::GraphCoarsening::G
protected
Graph NetworKit::GraphCoarsening::Gcoarsened
protected
std::vector<node> NetworKit::GraphCoarsening::nodeMapping
protected

The documentation for this class was generated from the following files: