src/work/bfsdemo.cc
changeset 7 0f527d1b9149
parent 4 8009bb5ddd09
child 8 cd54905012bc
equal deleted inserted replaced
1:761e5ac7b957 2:e08129fd998d
    80 // New style bfs traits
    80 // New style bfs traits
    81 class BFS_T 
    81 class BFS_T 
    82 {
    82 {
    83 public:
    83 public:
    84 
    84 
    85   typedef IGraph Graph_t;
    85   typedef IGraph Graph;
    86   typedef IGraph::OutEdgeIterator SearchEdgeIterator;
    86   typedef IGraph::OutEdgeIterator SearchEdgeIterator;
    87   
    87   
    88   struct visited_map_t {
    88   struct visited_map_t {
    89     typedef bool value_type;
    89     typedef bool value_type;
    90     void Put(const IGraph::NodeIterator &n,const value_type &t) { n->isVis=t; }
    90     void Put(const IGraph::NodeIterator &n,const value_type &t) { n->isVis=t; }