Changeset 1744:51d5d41e15b1 in lemon-0.x for demo
- Timestamp:
- 10/26/05 13:09:29 (17 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2272
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
demo/dim_to_lgf.cc
r1641 r1744 162 162 StringMap cost(graph), capacity(graph); 163 163 readDimacs(is, graph, capacity, s, t, cost); 164 writeGraph(os, graph, capacity, s, t, cost); 164 GraphWriter<Graph>(os, graph). 165 writeEdgeMap("capacity", capacity). 166 writeNode("source", s). 167 writeNode("target", t). 168 writeEdgeMap("cost", cost). 169 run(); 165 170 } else if (typeName == "maxflow") { 166 171 Graph graph; … … 168 173 StringMap capacity(graph); 169 174 readDimacs(is, graph, capacity, s, t); 170 writeGraph(os, graph, capacity, s, t); 175 GraphWriter<Graph>(os, graph). 176 writeEdgeMap("capacity", capacity). 177 writeNode("source", s). 178 writeNode("target", t). 179 run(); 171 180 } else if (typeName == "shortestpath") { 172 181 Graph graph; … … 174 183 StringMap capacity(graph); 175 184 readDimacs(is, graph, capacity, s); 176 writeGraph(os, graph, capacity, s); 185 GraphWriter<Graph>(os, graph). 186 writeEdgeMap("capacity", capacity). 187 writeNode("source", s). 188 run(); 177 189 } else if (typeName == "capacitated") { 178 190 Graph graph; 179 191 StringMap capacity(graph); 180 192 readDimacs(is, graph, capacity); 181 writeGraph(os, graph, capacity); 193 GraphWriter<Graph>(os, graph). 194 writeEdgeMap("capacity", capacity). 195 run(); 182 196 } else if (typeName == "plain") { 183 197 Graph graph; 184 198 readDimacs(is, graph); 185 writeGraph(os, graph);199 GraphWriter<Graph>(os, graph).run(); 186 200 } else { 187 201 cerr << "Invalid type error" << endl;
Note: See TracChangeset
for help on using the changeset viewer.