tools/dim_to_lgf.cc
changeset 2486 0c498f2239a8
parent 2413 21eb3ccdc3df
child 2491 b63ae56979ef
equal deleted inserted replaced
2:304fc627268f 3:302d21cc6abe
   114   }
   114   }
   115   ostream& os = (outputName.empty() ? cout : output);
   115   ostream& os = (outputName.empty() ? cout : output);
   116 
   116 
   117   if (mincostflow) {
   117   if (mincostflow) {
   118     Graph graph;
   118     Graph graph;
       
   119     DoubleEdgeMap lower(graph), capacity(graph), cost(graph);
   119     DoubleNodeMap supply(graph);
   120     DoubleNodeMap supply(graph);
   120     DoubleEdgeMap lower(graph), capacity(graph), cost(graph);
   121     readDimacs(is, graph, lower, capacity, cost, supply);
   121     readDimacs(is, graph, supply, lower, capacity, cost);
       
   122     GraphWriter<Graph>(os, graph).
   122     GraphWriter<Graph>(os, graph).
   123       writeNodeMap("supply", supply).
   123       writeNodeMap("supply", supply).
   124       writeEdgeMap("lower", lower).
   124       writeEdgeMap("lower", lower).
   125       writeEdgeMap("capacity", capacity).
   125       writeEdgeMap("capacity", capacity).
   126       writeEdgeMap("cost", cost).
   126       writeEdgeMap("cost", cost).