All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DynDijkstra.h
Go to the documentation of this file.
1 /*
2  * DynDijkstra.h
3  *
4  * Created on: 21.07.2014
5  * Author: ebergamini
6  */
7 
8 #ifndef DYNDIJKSTRA_H_
9 #define DYNDIJKSTRA_H_
10 
11 #include "DynSSSP.h"
12 
13 namespace NetworKit {
14 
19 class DynDijkstra : public DynSSSP {
20 
21 public:
22 
30  DynDijkstra(const Graph& G, node s, bool storePredecessors = true);
31 
32  // TODO the run method could take a vector of distances as an input and in that case just use those distances instead of computing dijkstra from scratch
33  void run() override;
34 
36  void update(GraphEvent e) override;
37 
39  void updateBatch(const std::vector<GraphEvent>& batch) override;
40 
41 
42 protected:
43  enum Color {WHITE, BLACK};
44  std::vector<Color> color;
45 };
46 
47 
48 } /* namespace NetworKit */
49 
50 #endif /* DYNDIJKSTRA_H_ */
DynDijkstra(const Graph &G, node s, bool storePredecessors=true)
Creates the object for G and source s.
Definition: DynDijkstra.cpp:18
void update(GraphEvent e) override
Updates the distances after an edge insertion.
Definition: DynDijkstra.cpp:33
const Graph & G
Definition: SSSP.h:127
Definition: DynDijkstra.h:43
std::vector< Color > color
Definition: DynDijkstra.h:44
Definition: DynDijkstra.h:43
void updateBatch(const std::vector< GraphEvent > &batch) override
Updates the distances after a batch of edge insertions.
Definition: DynDijkstra.cpp:39
Definition: GraphEvent.h:19
void run() override
Computes the shortest paths from the source to all other nodes.
Definition: DynDijkstra.cpp:23
index node
Definition: Globals.h:23
Interface for dynamic single-source shortest path algorithms.
Definition: DynSSSP.h:24
Color
Definition: DynDijkstra.h:43
A graph (with optional weights) and parallel iterator methods.
Definition: Graph.h:79
Dynamic Dijkstra.
Definition: DynDijkstra.h:19