Tracore
KShortestPaths.h
1 //
2 // Created by wrede on 28.06.16.
3 //
4 
5 #ifndef GBMOT_KSHORTESTPATHS_H
6 #define GBMOT_KSHORTESTPATHS_H
7 #include "../graph/Definitions.h"
8 
9 namespace algo
10 {
17  {
18  private:
22  DirectedGraph orig_graph_;
23 
27  Vertex source_;
28 
32  Vertex sink_;
33 
37  VertexPredecessorMap paths_;
38 
42  std::vector<Vertex> sink_neighbors_;
43 
54  bool FindPath(DirectedGraph& graph, Vertex& source, Vertex& sink,
55  VertexPredecessorMap& predecessors, VertexDistanceMap& distances);
56  bool FindPath(DirectedGraph& graph, Vertex& source, Vertex& sink,
57  VertexPredecessorMap& predecessors);
58 
62  void FindPathPair();
63 
69  void FindPaths(size_t count);
70 
76  void AddPath(VertexPredecessorMap& path);
77 
84  void AddPath(VertexPredecessorMap& in, MultiPredecessorMap& out);
85 
92  void AddPaths(MultiPredecessorMap& paths);
93  public:
102  KShortestPaths(DirectedGraph input_graph, Vertex source, Vertex sink);
103 
110  void Run(size_t max_path_count);
111 
117  void GetPaths(std::vector<std::vector<Vertex>>& paths);
118  };
119 }
120 
121 
122 #endif //GBMOT_KSHORTESTPATHS_H
void Run(size_t max_path_count)
Definition: KShortestPaths.cpp:23
KShortestPaths(DirectedGraph input_graph, Vertex source, Vertex sink)
Definition: KShortestPaths.cpp:16
Definition: Berclaz.cpp:10
void GetPaths(std::vector< std::vector< Vertex >> &paths)
Definition: KShortestPaths.cpp:548
Definition: KShortestPaths.h:16