Changeset 2413:21eb3ccdc3df in lemon0.x for tools
 Timestamp:
 03/22/07 16:40:50 (17 years ago)
 Branch:
 default
 Phase:
 public
 Convert:
 svn:c9d7d8f590d60310b91f818b3a526b0e/lemon/trunk@3244
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

tools/dim_to_lgf.cc
r2410 r2413 47 47 typedef Graph::EdgeIt EdgeIt; 48 48 typedef Graph::NodeIt NodeIt; 49 typedef Graph::EdgeMap<double> DoubleMap; 49 typedef Graph::EdgeMap<double> DoubleEdgeMap; 50 typedef Graph::NodeMap<double> DoubleNodeMap; 50 51 51 52 std::string inputName; … … 116 117 if (mincostflow) { 117 118 Graph graph; 118 Node s, t;119 Double Map cost(graph), capacity(graph);120 readDimacs(is, graph, capacity, s, t, cost);119 DoubleNodeMap supply(graph); 120 DoubleEdgeMap lower(graph), capacity(graph), cost(graph); 121 readDimacs(is, graph, supply, lower, capacity, cost); 121 122 GraphWriter<Graph>(os, graph). 123 writeNodeMap("supply", supply). 124 writeEdgeMap("lower", lower). 122 125 writeEdgeMap("capacity", capacity). 123 writeNode("source", s).124 writeNode("target", t).125 126 writeEdgeMap("cost", cost). 126 127 run(); … … 128 129 Graph graph; 129 130 Node s, t; 130 Double Map capacity(graph);131 DoubleEdgeMap capacity(graph); 131 132 readDimacs(is, graph, capacity, s, t); 132 133 GraphWriter<Graph>(os, graph). … … 138 139 Graph graph; 139 140 Node s; 140 Double Map capacity(graph);141 DoubleEdgeMap capacity(graph); 141 142 readDimacs(is, graph, capacity, s); 142 143 GraphWriter<Graph>(os, graph). … … 146 147 } else if (capacitated) { 147 148 Graph graph; 148 Double Map capacity(graph);149 DoubleEdgeMap capacity(graph); 149 150 readDimacs(is, graph, capacity); 150 151 GraphWriter<Graph>(os, graph).
Note: See TracChangeset
for help on using the changeset viewer.