Changeset 2335:27aa03cd3121 in lemon-0.x for test/all_pairs_shortest_path_test.cc
- Timestamp:
- 01/08/07 11:39:59 (18 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@3123
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
test/all_pairs_shortest_path_test.cc
r2269 r2335 29 29 30 30 #include <lemon/fib_heap.h> 31 32 #include <lemon/path.h> 31 33 32 34 #include <lemon/time_measure.h> … … 91 93 } 92 94 95 bool checked_path = false; 96 93 97 for (NodeIt it(graph); it != INVALID; ++it) { 94 98 for (NodeIt jt(graph); jt != INVALID; ++jt) { … … 98 102 "Wrong connection in all pairs shortest path"); 99 103 if (johnson.connected(it, jt)) { 104 if (it != jt && !checked_path) { 105 { 106 Path<Graph> path = johnson.path(it, jt); 107 check(checkPath(graph, path), "Wrong path."); 108 check(pathSource(graph, path) == it, "Wrong path."); 109 check(pathTarget(graph, path) == jt, "Wrong path."); 110 } 111 { 112 Path<Graph> path = floyd.path(it, jt); 113 check(checkPath(graph, path), "Wrong path."); 114 check(pathSource(graph, path) == it, "Wrong path."); 115 check(pathTarget(graph, path) == jt, "Wrong path."); 116 } 117 checked_path = true; 118 std::cout << "Path checked" << std::endl; 119 } 100 120 check(johnson.dist(it, jt) == floyd.dist(it, jt), 101 121 "Wrong distance in all pairs shortest path");
Note: See TracChangeset
for help on using the changeset viewer.