All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
StronglyConnectedComponents.h
Go to the documentation of this file.
1 /*
2  * StronglyConnectedComponents.h
3  *
4  * Created on: 01.06.2014
5  * Author: Klara Reichard (klara.reichard@gmail.com), Marvin Ritter (marvin.ritter@gmail.com)
6  */
7 
8 #ifndef STRONGLYCONNECTEDCOMPONENTS_H_
9 #define STRONGLYCONNECTEDCOMPONENTS_H_
10 
11 #include "../graph/Graph.h"
12 #include "../structures/Partition.h"
13 
14 namespace NetworKit {
15 
21 public:
22  StronglyConnectedComponents(const Graph& G, bool iterativeAlgo=true);
23 
28  void run();
29 
34  void runIteratively();
35 
40  void runRecursively();
41 
46 
53 
54 
59 
60 
61 private:
62  const Graph& G;
63  bool iterativeAlgo;
64  Partition component;
65 };
66 
67 }
68 
69 
70 #endif /* STRONGLYCONNECTEDCOMPONENTS_H_ */
void runIteratively()
This method determines the connected components for the graph g (iterative implementation).
Definition: StronglyConnectedComponents.cpp:79
StronglyConnectedComponents(const Graph &G, bool iterativeAlgo=true)
Definition: StronglyConnectedComponents.cpp:21
void runRecursively()
This method determines the connected components for the graph g (recursive implementation).
Definition: StronglyConnectedComponents.cpp:33
count componentOfNode(node u)
This method returns the the component in which node query is situated.
Definition: StronglyConnectedComponents.cpp:175
count numberOfComponents()
This method returns the number of connected components.
Definition: StronglyConnectedComponents.cpp:171
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
void run()
This method determines the connected components for the graph g (by default: iteratively).
Definition: StronglyConnectedComponents.cpp:25
A graph (with optional weights) and parallel iterator methods.
Definition: Graph.h:79
Partition getPartition()
Return a Partition that represents the components.
Definition: StronglyConnectedComponents.cpp:167
Determines the strongly connected components of an directed graph.
Definition: StronglyConnectedComponents.h:20