COIN-OR::LEMON - Graph Library

Changeset 8:cd54905012bc in lemon-0.x for src/include/bfs.h


Ignore:
Timestamp:
12/16/03 19:17:51 (18 years ago)
Author:
Alpar Juttner
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@21
Message:

-New test: bfsdemo2.cc added

  • Graph class has a NodeMap? and an EdgeMap? member class
  • default_bfs_T uning the above Maps is added
  • a (property)map must provide a member function SetG() to attach the map to a graph
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/include/bfs.h

    r6 r8  
    4646 
    4747  struct do_nothing_map {
    48     template <typename V,typename T>
    49     static void Put(V v,T t) {}
     48    template <typename V,typename T> static void Put(V v,T t) {}
     49    template <typename G> void SetG(G &g) {}
    5050  };
    5151 
     
    283283    Graph *G;
    284284   
     285    //Bfs(int i): visited_map(G), tree_map(G), dist_map(G), priority_map(G) {}
     286    Bfs() {}
     287
    285288    void SetG(Graph &Gr)
    286289    {
    287290      G=&Gr;
     291      visited_map.SetG(Gr);
     292      tree_map.SetG(Gr);
     293      dist_map.SetG(Gr);
     294      priority_map.SetG(Gr);
    288295    }
    289296   
Note: See TracChangeset for help on using the changeset viewer.