COIN-OR::LEMON - Graph Library

Changeset 780:e06d0d16595f in lemon-0.x for src/test/dijkstra_test.cc


Ignore:
Timestamp:
09/01/04 17:08:41 (17 years ago)
Author:
Alpar Juttner
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1073
Message:
  • DFS class (bfs.h and bfs_test.cc) added
  • Bugfixes in Dijkstra and Bfs
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/test/dijkstra_test.cc

    r776 r780  
    8787
    8888  ///\bug This works only for integer lengths
    89   for(NodeIt v(G); v!=INVALID; ++v)
    90     if ( dijkstra_test.reached(v) ) {
     89  for(NodeIt v(G); v!=INVALID; ++v){
     90    check(dijkstra_test.reached(v),"Each node should be reached.");
     91    if ( dijkstra_test.pred(v)!=INVALID ) {
    9192      Edge e=dijkstra_test.pred(v);
    9293      Node u=G.tail(e);
     94      check(u==dijkstra_test.predNode(v),"Wrong tree.");
    9395      check(dijkstra_test.dist(v) - dijkstra_test.dist(u) == cap[e],
    94             "Bad shortest path tree edge! Difference: "
     96            "Wrong distance! Difference: "
    9597            << std::abs(dijkstra_test.dist(v) - dijkstra_test.dist(u)
    9698                            - cap[e]));
    9799    }
     100  }
    98101}
     102
Note: See TracChangeset for help on using the changeset viewer.