COIN-OR::LEMON - Graph Library

Changeset 931:9227ecd7b0bc in lemon-0.x


Ignore:
Timestamp:
09/30/04 19:32:00 (16 years ago)
Author:
marci
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1253
Message:

SubGraphWrapper? code example, converter from dimacs to graphviz dot file.
The second one can be a tool for generating documentation of code examples.

Location:
src/demo
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • src/demo/sub_graph_wrapper_demo.cc

    r921 r931  
    1515#include <lemon/dimacs.h>
    1616#include <lemon/preflow.h>
    17 #include <lemon/tight_edge_filter_map.h>
     17#include <tight_edge_filter_map.h>
    1818
    1919using namespace lemon;
     
    3838  readDimacs(std::cin, g, length, s, t);
    3939
    40   cout << "edges with lengths (of form tail--length->head): " << endl;
     40  cout << "edges with lengths (of form id, tail--length->head): " << endl;
    4141  for(EdgeIt e(g); e!=INVALID; ++e)
    42     cout << " " << g.id(g.tail(e)) << "--"
     42    cout << " " << g.id(e) << ", " << g.id(g.tail(e)) << "--"
    4343         << length[e] << "->" << g.id(g.head(e)) << endl;
    4444
     
    6868  preflow.run();
    6969
     70  cout << "maximum number of edge-disjoint shortest path: "
     71       << preflow.flowValue() << endl;
    7072  cout << "edges of the maximum number of edge-disjoint shortest s-t paths: "
    7173       << endl;
    7274  for(EdgeIt e(g); e!=INVALID; ++e)
    7375    if (flow[e])
    74       cout << " " << g.id(g.tail(e)) << "--"
     76      cout << " " << g.id(e) << ", "
     77           << g.id(g.tail(e)) << "--"
    7578           << length[e] << "->" << g.id(g.head(e)) << endl;
    76 
    77   return 0;
    7879}
Note: See TracChangeset for help on using the changeset viewer.