1.1 --- a/tools/dim_to_lgf.cc Thu Mar 22 06:36:50 2007 +0000
1.2 +++ b/tools/dim_to_lgf.cc Thu Mar 22 15:40:50 2007 +0000
1.3 @@ -46,7 +46,8 @@
1.4 typedef Graph::Node Node;
1.5 typedef Graph::EdgeIt EdgeIt;
1.6 typedef Graph::NodeIt NodeIt;
1.7 - typedef Graph::EdgeMap<double> DoubleMap;
1.8 + typedef Graph::EdgeMap<double> DoubleEdgeMap;
1.9 + typedef Graph::NodeMap<double> DoubleNodeMap;
1.10
1.11 std::string inputName;
1.12 std::string outputName;
1.13 @@ -115,19 +116,19 @@
1.14
1.15 if (mincostflow) {
1.16 Graph graph;
1.17 - Node s, t;
1.18 - DoubleMap cost(graph), capacity(graph);
1.19 - readDimacs(is, graph, capacity, s, t, cost);
1.20 + DoubleNodeMap supply(graph);
1.21 + DoubleEdgeMap lower(graph), capacity(graph), cost(graph);
1.22 + readDimacs(is, graph, supply, lower, capacity, cost);
1.23 GraphWriter<Graph>(os, graph).
1.24 + writeNodeMap("supply", supply).
1.25 + writeEdgeMap("lower", lower).
1.26 writeEdgeMap("capacity", capacity).
1.27 - writeNode("source", s).
1.28 - writeNode("target", t).
1.29 writeEdgeMap("cost", cost).
1.30 run();
1.31 } else if (maxflow) {
1.32 Graph graph;
1.33 Node s, t;
1.34 - DoubleMap capacity(graph);
1.35 + DoubleEdgeMap capacity(graph);
1.36 readDimacs(is, graph, capacity, s, t);
1.37 GraphWriter<Graph>(os, graph).
1.38 writeEdgeMap("capacity", capacity).
1.39 @@ -137,7 +138,7 @@
1.40 } else if (shortestpath) {
1.41 Graph graph;
1.42 Node s;
1.43 - DoubleMap capacity(graph);
1.44 + DoubleEdgeMap capacity(graph);
1.45 readDimacs(is, graph, capacity, s);
1.46 GraphWriter<Graph>(os, graph).
1.47 writeEdgeMap("capacity", capacity).
1.48 @@ -145,7 +146,7 @@
1.49 run();
1.50 } else if (capacitated) {
1.51 Graph graph;
1.52 - DoubleMap capacity(graph);
1.53 + DoubleEdgeMap capacity(graph);
1.54 readDimacs(is, graph, capacity);
1.55 GraphWriter<Graph>(os, graph).
1.56 writeEdgeMap("capacity", capacity).