COIN-OR::LEMON - Graph Library

Changeset 1744:51d5d41e15b1 in lemon-0.x for demo


Ignore:
Timestamp:
10/26/05 13:09:29 (14 years ago)
Author:
Balazs Dezso
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2272
Message:

Removing old input/output functions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • demo/dim_to_lgf.cc

    r1641 r1744  
    162162    StringMap cost(graph), capacity(graph);
    163163    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();
    165170  } else if (typeName == "maxflow") {
    166171    Graph graph;
     
    168173    StringMap capacity(graph);
    169174    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();
    171180  } else if (typeName == "shortestpath") {
    172181    Graph graph;
     
    174183    StringMap capacity(graph);
    175184    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();
    177189  } else if (typeName == "capacitated") {
    178190    Graph graph;
    179191    StringMap capacity(graph);
    180192    readDimacs(is, graph, capacity);
    181     writeGraph(os, graph, capacity);
     193    GraphWriter<Graph>(os, graph).
     194      writeEdgeMap("capacity", capacity).
     195      run();
    182196  } else if (typeName == "plain") {
    183197    Graph graph;
    184198    readDimacs(is, graph);
    185     writeGraph(os, graph);
     199    GraphWriter<Graph>(os, graph).run();
    186200  } else {
    187201    cerr << "Invalid type error" << endl;
Note: See TracChangeset for help on using the changeset viewer.