demo/graph_orientation.cc
changeset 1901 723b2b81d900
parent 1875 98698b69a902
child 1913 49fe71fce7fb
     1.1 --- a/demo/graph_orientation.cc	Thu Jan 19 16:56:39 2006 +0000
     1.2 +++ b/demo/graph_orientation.cc	Tue Jan 24 16:07:38 2006 +0000
     1.3 @@ -49,13 +49,13 @@
     1.4    ListGraph g;
     1.5  
     1.6    ListGraph::NodeMap<int> f(g); //in-deg requirement;
     1.7 -  ListGraph::NodeMap<int> id(g);
     1.8 +  ListGraph::NodeMap<int> label(g);
     1.9    ListGraph::NodeMap<xy<double> > coords(g);
    1.10    
    1.11    try {
    1.12      GraphReader<ListGraph> reader(argv[1],g);
    1.13      reader.readNodeMap("f",f);
    1.14 -    reader.readNodeMap("id",id);
    1.15 +    reader.readNodeMap("label",label);
    1.16      reader.readNodeMap("coordinates_x",xMap(coords));
    1.17      reader.readNodeMap("coordinates_y",yMap(coords));
    1.18      reader.run();
    1.19 @@ -80,15 +80,15 @@
    1.20    
    1.21    Node act;
    1.22    while((act=IterableBoolNodeMap<ListGraph>::TrueIt(active))!=INVALID) {
    1.23 -    std::cout << "Process node " << id[act]
    1.24 +    std::cout << "Process node " << label[act]
    1.25  	      << " (def=" << def[act]
    1.26  	      << " lev=" << level[act] << "): ";
    1.27      OutEdgeIt e(g,act);
    1.28      while(e!=INVALID && level[g.target(e)]>=level[act]) ++e;
    1.29      if(e!=INVALID) {
    1.30        std::cout << " REVERT EDGE " << g.id(e)
    1.31 -		<< " (" << id[g.source(e)] << "---"
    1.32 -		<< id[g.target(e)] << ")"
    1.33 +		<< " (" << label[g.source(e)] << "---"
    1.34 +		<< label[g.target(e)] << ")"
    1.35  		<< std::endl;
    1.36        if(--def[act]==0) active[act]=false;
    1.37        if(++def[g.target(e)]>0) active[g.target(e)]=true;