COIN-OR::LEMON - Graph Library

Ignore:
Timestamp:
05/11/04 17:42:11 (20 years ago)
Author:
athos
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@789
Message:

Finished MinLengthPaths?: a specialization of MinCostFlows?.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/work/athos/minlength_demo.cc

    r511 r607  
    33
    44#include <list_graph.h>
    5 #include <dimacs.h>
    6 #include <minlengthpaths.h>
     5#include <hugo/dimacs.h>
     6#include <hugo/time_measure.h>
     7#include "minlengthpaths.h"
    78//#include <time_measure.h>
    89
     
    2021  Node s, t;
    2122  Graph::EdgeMap<int> cap(G);
    22   readDimacsMaxFlow(std::cin, G, s, t, cap);
     23  readDimacs(std::cin, G, cap, s, t);
    2324
    24   std::cout << "preflow demo (ATHOS)..." << std::endl;
     25  std::cout << "Minlengthpaths demo (ATHOS)..." << std::endl;
    2526  //Graph::EdgeMap<int> flow(G); //0 flow
    2627
     
    3233  MinLengthPaths<Graph, Graph::EdgeMap<int> >
    3334    surb_test(G,cap);
    34   std::cout << surb_test.run(s,t,k) << std::endl;
    35   std::cout << surb_test.totalLength() << std::endl;
     35  Timer ts;
     36  ts.reset();
     37  std::cout << "Number of found paths: " << surb_test.run(s,t,k) << std::endl;
     38  std::cout << "elapsed time: " << ts << std::endl;
     39 
     40  std::cout << "Total length of found paths: " << surb_test.totalLength() << std::endl;
     41  //std::cout << (surb_test.checkComplementarySlackness() ? "OK (compl. slackn.)." : "Problem (compl. slackn.)!!!") << std::endl;
     42
    3643  //preflow_push<Graph, int> max_flow_test(G, s, t, cap);
    3744  //int flow_value=max_flow_test.run();
Note: See TracChangeset for help on using the changeset viewer.