COIN-OR::LEMON - Graph Library

Changeset 1901:723b2b81d900 in lemon-0.x for demo/graph_orientation.cc


Ignore:
Timestamp:
01/24/06 17:07:38 (14 years ago)
Author:
Balazs Dezso
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2476
Message:

Lemon Graph Format uses label instead of id named map.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • demo/graph_orientation.cc

    r1875 r1901  
    5050
    5151  ListGraph::NodeMap<int> f(g); //in-deg requirement;
    52   ListGraph::NodeMap<int> id(g);
     52  ListGraph::NodeMap<int> label(g);
    5353  ListGraph::NodeMap<xy<double> > coords(g);
    5454 
     
    5656    GraphReader<ListGraph> reader(argv[1],g);
    5757    reader.readNodeMap("f",f);
    58     reader.readNodeMap("id",id);
     58    reader.readNodeMap("label",label);
    5959    reader.readNodeMap("coordinates_x",xMap(coords));
    6060    reader.readNodeMap("coordinates_y",yMap(coords));
     
    8181  Node act;
    8282  while((act=IterableBoolNodeMap<ListGraph>::TrueIt(active))!=INVALID) {
    83     std::cout << "Process node " << id[act]
     83    std::cout << "Process node " << label[act]
    8484              << " (def=" << def[act]
    8585              << " lev=" << level[act] << "): ";
     
    8888    if(e!=INVALID) {
    8989      std::cout << " REVERT EDGE " << g.id(e)
    90                 << " (" << id[g.source(e)] << "---"
    91                 << id[g.target(e)] << ")"
     90                << " (" << label[g.source(e)] << "---"
     91                << label[g.target(e)] << ")"
    9292                << std::endl;
    9393      if(--def[act]==0) active[act]=false;
Note: See TracChangeset for help on using the changeset viewer.