All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
NetworKit::ParallelConnectedComponents Class Reference

Determines the connected components of an undirected graph. More...

#include <ParallelConnectedComponents.h>

Public Member Functions

 ParallelConnectedComponents (const Graph &G, bool coarsening=true)
 
void runSequential ()
 This method determines the connected components for the graph g. More...
 
void run ()
 This method determines the connected components for the graph g. More...
 
count numberOfComponents ()
 This method returns the number of connected components. More...
 
count componentOfNode (node u)
 This method returns the the component in which node query is situated. More...
 
Partition getPartition ()
 Return a Partition that represents the components. 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
 

Additional Inherited Members

- Protected Attributes inherited from NetworKit::Algorithm
bool hasRun
 A boolean variable indicating whether an algorithm has finished its computation or not. More...
 

Detailed Description

Determines the connected components of an undirected graph.

Constructor & Destructor Documentation

NetworKit::ParallelConnectedComponents::ParallelConnectedComponents ( const Graph G,
bool  coarsening = true 
)
Parameters
[in]GGraph for which connected components shall be computed.
[in]coarseningSpecifies whether the main algorithm based on label propagation (LP) shall work recursively (true) or not (false) by coarsening/contracting an LP-computed clustering. Defaults to true since we saw positive effects in terms of running time for many networks. Beware of possible memory implications.

Member Function Documentation

count NetworKit::ParallelConnectedComponents::componentOfNode ( node  u)

This method returns the the component in which node query is situated.

Parameters
[in]querythe node whose component is asked for
Partition NetworKit::ParallelConnectedComponents::getPartition ( )

Return a Partition that represents the components.

count NetworKit::ParallelConnectedComponents::numberOfComponents ( )

This method returns the number of connected components.

void NetworKit::ParallelConnectedComponents::run ( )
virtual

This method determines the connected components for the graph g.

Implements NetworKit::Algorithm.

void NetworKit::ParallelConnectedComponents::runSequential ( )

This method determines the connected components for the graph g.


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