Check StaticGraphSkeleton, as well.
2 Egy pontból összes többibe vezető legrövidebb utak irányított gráfban
6 - pontból kimenő éleket sorban visszaadni
7 A T számtípus, ami tud összehasonlítást, összedást
17 //#include <algorithm>
20 //#include "pf_hiba.hh"
21 //#include <marci_list_graph.hh>
22 //#include <marci_graph_traits.hh>
29 template <typename graph_type, typename T>
33 typedef typename graph_type::NodeIt NodeIt;
34 typedef typename graph_type::EdgeIt EdgeIt;
35 typedef typename graph_type::EachNodeIt EachNodeIt;
36 typedef typename graph_type::EachEdgeIt EachEdgeIt;
37 typedef typename graph_type::OutEdgeIt OutEdgeIt;
38 typedef typename graph_type::InEdgeIt InEdgeIt;
39 typedef typename graph_type::SymEdgeIt SymEdgeIt;
43 //---------------------------------------------
44 //Parameters of the algorithm
45 //---------------------------------------------
47 //---------------------------------------------
48 //Parameters of the algorithm
49 //---------------------------------------------
55 typename graph_type::EdgeMap<T> &weight;
56 //typename graph_type::EdgeMap<T> &capacity;
58 //typename graph_type::EdgeMap<T>
59 // typename graph_type::EdgeMap<T> preflow;
61 //auxiliary variables for computation
62 deque<NodeIt> next_to_reach;
65 typename graph_type::NodeMap<bool> reached;
67 //Variables holding output
68 //Predessors in the shortest paths arborescence
69 typename graph_type::NodeMap<NodeIt> pred;
78 typename graph_type::EdgeMap<T> & _weight)
90 NodeMap<graph_type, T> &d;
91 Node_dist_comp(NodeMap<graph_type, T> &_d) : d(_d) {}
93 bool operator()(const NodeIt& u, const NodeIt& v) const
94 { return d.get(u) < d.get(v); }
101 NodeMap<graph_type, bool> scanned(G, false);
102 std::priority_queue<NodeIt, vector<NodeIt>, Node_dist_comp>
103 heap(( Node_dist_comp(distance) ));
106 reached.set(s, true);
118 }; //class dijkstra_at