COIN-OR::LEMON - Graph Library

Changeset 8:cd54905012bc in lemon-0.x for src/work/bfsdemo.cc


Ignore:
Timestamp:
12/16/03 19:17:51 (16 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/work/bfsdemo.cc

    r6 r8  
    6868    void Put(const IGraph::NodeIterator &n,const value_type &t) { n->isVis=t; }
    6969    value_type Get(const IGraph::NodeIterator &n) const { return n->isVis; }
     70    void SetG(IGraph &G) {}
    7071  } visited;
    7172  struct _tree_map_t {
     
    7374    void Put(const IGraph::NodeIterator &n,const value_type &t)
    7475    { cout << t.From().Index() << "->" << t.To().Index() << '\n'; }
     76    void SetG(IGraph &G) {}
    7577  } tree;
    7678  do_nothing_map dist;   //node->int (W)
     
    9092    void Put(const IGraph::NodeIterator &n,const value_type &t) { n->isVis=t; }
    9193    value_type Get(const IGraph::NodeIterator &n) const { return n->isVis; }
     94    void SetG(IGraph &G) {}
    9295  };
    9396  struct tree_map_t {
     
    9598    void Put(const IGraph::NodeIterator &n,const value_type &t)
    9699    { cout << t.From().Index() << "->" << t.To().Index() << '\n'; }
     100    void SetG(IGraph &G) {}
    97101  };
    98102  typedef do_nothing_map dist_map_t;   //node->int (W)
Note: See TracChangeset for help on using the changeset viewer.