diff -r 086fc76d591d -r 21eb3ccdc3df tools/dim_to_lgf.cc --- a/tools/dim_to_lgf.cc Thu Mar 22 06:36:50 2007 +0000 +++ b/tools/dim_to_lgf.cc Thu Mar 22 15:40:50 2007 +0000 @@ -46,7 +46,8 @@ typedef Graph::Node Node; typedef Graph::EdgeIt EdgeIt; typedef Graph::NodeIt NodeIt; - typedef Graph::EdgeMap DoubleMap; + typedef Graph::EdgeMap DoubleEdgeMap; + typedef Graph::NodeMap DoubleNodeMap; std::string inputName; std::string outputName; @@ -115,19 +116,19 @@ if (mincostflow) { Graph graph; - Node s, t; - DoubleMap cost(graph), capacity(graph); - readDimacs(is, graph, capacity, s, t, cost); + DoubleNodeMap supply(graph); + DoubleEdgeMap lower(graph), capacity(graph), cost(graph); + readDimacs(is, graph, supply, lower, capacity, cost); GraphWriter(os, graph). + writeNodeMap("supply", supply). + writeEdgeMap("lower", lower). writeEdgeMap("capacity", capacity). - writeNode("source", s). - writeNode("target", t). writeEdgeMap("cost", cost). run(); } else if (maxflow) { Graph graph; Node s, t; - DoubleMap capacity(graph); + DoubleEdgeMap capacity(graph); readDimacs(is, graph, capacity, s, t); GraphWriter(os, graph). writeEdgeMap("capacity", capacity). @@ -137,7 +138,7 @@ } else if (shortestpath) { Graph graph; Node s; - DoubleMap capacity(graph); + DoubleEdgeMap capacity(graph); readDimacs(is, graph, capacity, s); GraphWriter(os, graph). writeEdgeMap("capacity", capacity). @@ -145,7 +146,7 @@ run(); } else if (capacitated) { Graph graph; - DoubleMap capacity(graph); + DoubleEdgeMap capacity(graph); readDimacs(is, graph, capacity); GraphWriter(os, graph). writeEdgeMap("capacity", capacity).