equal
deleted
inserted
replaced
43 // class do_nothing_map {}; |
43 // class do_nothing_map {}; |
44 // template <typename V,typename T> |
44 // template <typename V,typename T> |
45 // void Put(const do_nothing_map &p,const V &v,const T &t) {} |
45 // void Put(const do_nothing_map &p,const V &v,const T &t) {} |
46 |
46 |
47 struct do_nothing_map { |
47 struct do_nothing_map { |
48 template <typename V,typename T> |
48 template <typename V,typename T> static void Put(V v,T t) {} |
49 static void Put(V v,T t) {} |
49 template <typename G> void SetG(G &g) {} |
50 }; |
50 }; |
51 |
51 |
52 |
52 |
53 template <typename I,typename C, typename T, T C::*M> |
53 template <typename I,typename C, typename T, T C::*M> |
54 class class_element_map { |
54 class class_element_map { |
280 std::queue<bfs_queue_cont> bfs_queue; |
280 std::queue<bfs_queue_cont> bfs_queue; |
281 |
281 |
282 int priority; |
282 int priority; |
283 Graph *G; |
283 Graph *G; |
284 |
284 |
|
285 //Bfs(int i): visited_map(G), tree_map(G), dist_map(G), priority_map(G) {} |
|
286 Bfs() {} |
|
287 |
285 void SetG(Graph &Gr) |
288 void SetG(Graph &Gr) |
286 { |
289 { |
287 G=&Gr; |
290 G=&Gr; |
|
291 visited_map.SetG(Gr); |
|
292 tree_map.SetG(Gr); |
|
293 dist_map.SetG(Gr); |
|
294 priority_map.SetG(Gr); |
288 } |
295 } |
289 |
296 |
290 void Init() |
297 void Init() |
291 { |
298 { |
292 //There must be a better way to do this: |
299 //There must be a better way to do this: |