src/include/bfs.h
changeset 8 cd54905012bc
parent 6 b63d1bc367f7
     1.1 --- a/src/include/bfs.h	Tue Dec 16 17:52:52 2003 +0000
     1.2 +++ b/src/include/bfs.h	Tue Dec 16 18:17:51 2003 +0000
     1.3 @@ -45,8 +45,8 @@
     1.4    //   void Put(const do_nothing_map &p,const V &v,const T &t) {}
     1.5    
     1.6    struct do_nothing_map {
     1.7 -    template <typename V,typename T>
     1.8 -    static void Put(V v,T t) {}
     1.9 +    template <typename V,typename T> static void Put(V v,T t) {}
    1.10 +    template <typename G> void SetG(G &g) {}
    1.11    };
    1.12    
    1.13  
    1.14 @@ -282,9 +282,16 @@
    1.15      int priority;
    1.16      Graph *G;
    1.17      
    1.18 +    //Bfs(int i): visited_map(G), tree_map(G), dist_map(G), priority_map(G) {}
    1.19 +    Bfs() {}
    1.20 +
    1.21      void SetG(Graph &Gr)
    1.22      {
    1.23        G=&Gr;
    1.24 +      visited_map.SetG(Gr);
    1.25 +      tree_map.SetG(Gr);
    1.26 +      dist_map.SetG(Gr);
    1.27 +      priority_map.SetG(Gr);
    1.28      }
    1.29      
    1.30      void Init()