src/demo/lp_maxflow_demo.cc
changeset 1432 46b088b01f88
parent 1387 37d1b20cd9ef
equal deleted inserted replaced
2:115534b3a47e 3:7f0faff152b4
    73   ListGraph::Node t;
    73   ListGraph::Node t;
    74   
    74   
    75   ListGraph::EdgeMap<double> cap(g);
    75   ListGraph::EdgeMap<double> cap(g);
    76   
    76   
    77   GraphReader<ListGraph> reader(std::cin,g);
    77   GraphReader<ListGraph> reader(std::cin,g);
    78   reader.addNode("source",s).addNode("target",t)
    78   reader.readNode("source",s).readNode("target",t)
    79     .addEdgeMap("capacity",cap).run();
    79     .readEdgeMap("capacity",cap).run();
    80   
    80   
    81   // std::ifstream file("../test/preflow_");
    81   // std::ifstream file("../test/preflow_");
    82 //   readDimacs(file, g, cap, s, t);
    82 //   readDimacs(file, g, cap, s, t);
    83 
    83 
    84   std::cout << "Max flow value = " << maxFlow(g,cap,s,t) << std::endl;
    84   std::cout << "Max flow value = " << maxFlow(g,cap,s,t) << std::endl;