COIN-OR::LEMON - Graph Library

Changeset 167:7949a29a334e in lemon-0.x for src/work/jacint/dijkstra.cc


Ignore:
Timestamp:
03/11/04 13:55:50 (17 years ago)
Author:
jacint
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@238
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/work/jacint/dijkstra.cc

    r160 r167  
    2222  double pre_time=currTime();
    2323    Dijkstra<ListGraph, int> dijkstra_test(G, s, cap);
     24    dijkstra_test.run();
    2425  double post_time=currTime();
    2526   
    2627  std::cout << "running time: " << post_time-pre_time << " sec"<< std::endl;
    2728 
     29  int hiba=0;
    2830  EachEdgeIt e;
    29 
    3031  for ( G.getFirst(e) ; G.valid(e); G.next(e) ) {
    3132    NodeIt u=G.tail(e);
    3233    NodeIt v=G.head(e);
    33     assert ( dijkstra_test.dist(v) - dijkstra_test.dist(u) <= cap.get(e) );
     34    if ( dijkstra_test.dist(v) - dijkstra_test.dist(u) > cap.get(e) ) {
     35      std::cout<<"Hiba: "<<dijkstra_test.dist(v) - dijkstra_test.dist(u) - cap.get(e)<<std::endl;
     36      ++hiba;
     37    }
    3438  }
     39
     40  std::cout << "Hibas elek szama: " << hiba << " a " << G.edgeNum() <<"-bol."<< std::endl;
    3541
    3642  return 0;
Note: See TracChangeset for help on using the changeset viewer.