COIN-OR::LEMON - Graph Library

Changeset 60:89d2ce014e12 in lemon-0.x for src/work


Ignore:
Timestamp:
02/04/04 13:59:17 (21 years ago)
Author:
marci
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@75
Message:

.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/work/marci_graph_demo.cc

    r49 r60  
    166166  }
    167167
     168  //flowG.deleteEdge(s_v1);
     169  //flowG.deleteEdge(s_v2);
     170  //flowG.deleteEdge(v1_v2);
     171  //flowG.deleteEdge(v1_v3);
     172 
     173
    168174  //flowG.setTail(v3_t, v2);
    169175  //flowG.setHead(v3_t, s);
     
    180186  }
    181187 
     188  for(EachEdgeIt e=flowG.first<EachEdgeIt>(); e.valid(); ++e) {
     189    std::cout << node_name.get(flowG.tail(e)) << "-"<< cap.get(e) << "->" << node_name.get(flowG.head(e)) << " ";
     190  }
    182191
    183192  /*
     
    211220  */
    212221
    213   //ListGraph::EdgeMap<int> flow(flowG, 0);
    214   //ResGraph<ListGraph, int> res_graph(flowG, cap, flow);
    215   max_flow_type<ListGraph, int> max_flow_test(flowG, s, t, cap);
     222  std::cout << std::endl;
     223  //std::cout << "meg jo" << std::flush;
     224
     225  ListGraph::EdgeMap<int> flow(flowG, 0);
     226  MaxFlow<ListGraph, int, ListGraph::EdgeMap<int>, ListGraph::EdgeMap<int> > max_flow_test(flowG, s, t, flow, cap);
    216227  max_flow_test.run();
     228
     229  std::cout << "maximum flow: "<< std::endl;
     230  for(EachEdgeIt e=flowG.template first<EachEdgeIt>(); e.valid(); ++e) {
     231    std::cout<<"("<<flowG.tail(e)<< "-"<<flow.get(e)<<"->"<<flowG.head(e)<<") ";
     232  }
     233  std::cout<<std::endl;
    217234
    218235  return 0;
Note: See TracChangeset for help on using the changeset viewer.