src/work/athos/minlength_demo.cc
changeset 607 327f7cf13843
parent 511 325c9430723e
child 921 818510fa3d99
     1.1 --- a/src/work/athos/minlength_demo.cc	Tue May 11 14:58:09 2004 +0000
     1.2 +++ b/src/work/athos/minlength_demo.cc	Tue May 11 15:42:11 2004 +0000
     1.3 @@ -2,8 +2,9 @@
     1.4  #include <fstream>
     1.5  
     1.6  #include <list_graph.h>
     1.7 -#include <dimacs.h>
     1.8 -#include <minlengthpaths.h>
     1.9 +#include <hugo/dimacs.h>
    1.10 +#include <hugo/time_measure.h>
    1.11 +#include "minlengthpaths.h"
    1.12  //#include <time_measure.h>
    1.13  
    1.14  using namespace hugo;
    1.15 @@ -19,9 +20,9 @@
    1.16    Graph G;
    1.17    Node s, t;
    1.18    Graph::EdgeMap<int> cap(G);
    1.19 -  readDimacsMaxFlow(std::cin, G, s, t, cap);
    1.20 +  readDimacs(std::cin, G, cap, s, t);
    1.21  
    1.22 -  std::cout << "preflow demo (ATHOS)..." << std::endl;
    1.23 +  std::cout << "Minlengthpaths demo (ATHOS)..." << std::endl;
    1.24    //Graph::EdgeMap<int> flow(G); //0 flow
    1.25  
    1.26    //  double pre_time=currTime();
    1.27 @@ -31,8 +32,14 @@
    1.28      k = atoi(argv[1]);
    1.29    MinLengthPaths<Graph, Graph::EdgeMap<int> >
    1.30      surb_test(G,cap);
    1.31 -  std::cout << surb_test.run(s,t,k) << std::endl;
    1.32 -  std::cout << surb_test.totalLength() << std::endl;
    1.33 +  Timer ts;
    1.34 +  ts.reset();
    1.35 +  std::cout << "Number of found paths: " << surb_test.run(s,t,k) << std::endl;
    1.36 +  std::cout << "elapsed time: " << ts << std::endl;
    1.37 +  
    1.38 +  std::cout << "Total length of found paths: " << surb_test.totalLength() << std::endl;
    1.39 +  //std::cout << (surb_test.checkComplementarySlackness() ? "OK (compl. slackn.)." : "Problem (compl. slackn.)!!!") << std::endl;
    1.40 +
    1.41    //preflow_push<Graph, int> max_flow_test(G, s, t, cap);
    1.42    //int flow_value=max_flow_test.run();
    1.43