All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ParallelConnectedComponents.h
Go to the documentation of this file.
1 /*
2  * ConnectedComponents.cpp
3  *
4  * Created on: Dec 16, 2013
5  * Author: cls
6  */
7 
8 #ifndef PARALLELCONNECTEDCOMPONENTS_H_
9 #define PARALLELCONNECTEDCOMPONENTS_H_
10 
11 #include "../graph/Graph.h"
12 #include "../distance/BFS.h"
13 #include "../structures/Partition.h"
14 #include "../base/Algorithm.h"
15 
16 namespace NetworKit {
17 
23 public:
24 
33  ParallelConnectedComponents(const Graph& G, bool coarsening = true);
34 
38  void runSequential();
39 
43  void run();
44 
49 
56 
57 
62 
63 
64 private:
65  const Graph& G;
66  Partition component;
67  bool coarsening;
68 };
69 
70 }
71 
72 
73 #endif /* PARALLELCONNECTEDCOMPONENTS_H_ */
void runSequential()
This method determines the connected components for the graph g.
Definition: ParallelConnectedComponents.cpp:97
ParallelConnectedComponents(const Graph &G, bool coarsening=true)
Definition: ParallelConnectedComponents.cpp:15
Determines the connected components of an undirected graph.
Definition: ParallelConnectedComponents.h:22
void run()
This method determines the connected components for the graph g.
Definition: ParallelConnectedComponents.cpp:20
count numberOfComponents()
This method returns the number of connected components.
Definition: ParallelConnectedComponents.cpp:174
count componentOfNode(node u)
This method returns the the component in which node query is situated.
Definition: ParallelConnectedComponents.cpp:178
Implements a partition of a set, i.e.
Definition: Partition.h:31
uint64_t count
Definition: Globals.h:21
index node
Definition: Globals.h:23
Partition getPartition()
Return a Partition that represents the components.
Definition: ParallelConnectedComponents.cpp:170
Definition: Algorithm.h:9
A graph (with optional weights) and parallel iterator methods.
Definition: Graph.h:79