All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
BFS.h
Go to the documentation of this file.
1 /*
2  * BFS.h
3  *
4  * Created on: Jul 23, 2013
5  * Author: Henning
6  */
7 
8 #ifndef BFS_H_
9 #define BFS_H_
10 
11 #include "../graph/Graph.h"
12 #include "SSSP.h"
13 
14 namespace NetworKit {
15 
20 class BFS : public SSSP {
21 
22 friend class DynBFS;
23 
24 public:
34  BFS(const Graph& G, node source, bool storePaths=true, bool storeNodesSortedByDistance=false, node target = none);
35 
41  virtual void run();
42 
43 };
44 
45 } /* namespace NetworKit */
46 #endif /* BFS_H_ */
BFS(const Graph &G, node source, bool storePaths=true, bool storeNodesSortedByDistance=false, node target=none)
Constructs the BFS class for G and source node source.
Definition: BFS.cpp:13
node target
Definition: SSSP.h:129
const node source
Definition: SSSP.h:128
const Graph & G
Definition: SSSP.h:127
Abstract base class for single-source shortest path algorithms.
Definition: SSSP.h:23
constexpr index none
Constants.
Definition: Globals.h:28
index node
Definition: Globals.h:23
virtual void run()
Breadth-first search from source.
Definition: BFS.cpp:17
bool storeNodesSortedByDistance
if true, store a vector of nodes ordered in increasing distance from the source
Definition: SSSP.h:137
Dynamic breadth-first search.
Definition: DynBFS.h:20
A graph (with optional weights) and parallel iterator methods.
Definition: Graph.h:79
The BFS class is used to do a breadth-first search on a Graph from a given source node...
Definition: BFS.h:20
bool storePaths
if true, paths are reconstructable and the number of paths is stored
Definition: SSSP.h:136