COIN-OR::LEMON - Graph Library

Changeset 1577:15098fb5275c in lemon-0.x for demo/dim_to_dot.cc


Ignore:
Timestamp:
07/20/05 18:05:04 (15 years ago)
Author:
athos
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2078
Message:

Documentation (lp_demo,lp_maxflow) and slight changes (rest).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • demo/dim_to_dot.cc

    r1435 r1577  
    66// This program can be an aid in making up to date visualized documantation
    77// of demo programs.
     8
     9// For later documentation (if marci does not do it)
     10// Az a graphviz csomag egy egyszeru formatuma, ami egy graphrajzolo csomag.
     11// Az EdgeSubGraphAdaptor doksijaban szerepel egy kirajzolt graf. Azt nem
     12// kezzel csinaltam, hanem a megfelelo dim file-bol ezzel a progival. A
     13// doxygen ugyanis ilyet eszik, igy a juzer vizualisan is latja a grafot a
     14// doksiban, es sajat maga is le tudja futtatni az algoritmust, mert ott van
     15// a kezeben a dim file is. Es mivel ez egy generalt file, ezert ha vmit
     16// valtoztatunk a dim-en, ezt is konnyu bemasolni. Uff.
     17
    818
    919#include <iostream>
     
    1828using std::endl;
    1929
    20 int main()
    21 {   
     30int main(int argc, char *argv[])
     31{
     32  if(argc<2)
     33  {
     34      std::cerr << "USAGE: sub_graph_adaptor_demo input_file.dim" << std::endl;
     35      std::cerr << "The file 'input_file.dim' has to contain a max flow instance in DIMACS format (e.g. sub_graph_adaptor_demo.dim is such a file)." << std::endl;
     36      return 0;
     37  }
     38
     39
     40  //input stream to read the graph from
     41  std::ifstream is(argv[1]);
     42
    2243  typedef SmartGraph Graph;
    2344
     
    3253  LengthMap length(g);
    3354
    34   readDimacs(std::cin, g, length, s, t);
     55  readDimacs(is, g, length, s, t);
    3556
    3657  cout << "digraph lemon_dot_example {" << endl;
Note: See TracChangeset for help on using the changeset viewer.