test/all_pairs_shortest_path_test.cc
changeset 1810 474d093466a5
parent 1745 d356e54bdafc
child 1956 a055123339d5
equal deleted inserted replaced
2:2e8562716059 3:8fab841fb95f
    86 	check(johnson.dist(it, jt) == fibJohnson.dist(it, jt),
    86 	check(johnson.dist(it, jt) == fibJohnson.dist(it, jt),
    87 	      "Wrong distance in all pairs shortest path");
    87 	      "Wrong distance in all pairs shortest path");
    88 	if (it != jt) {
    88 	if (it != jt) {
    89  	  check(johnson.dist(it, jt) == 
    89  	  check(johnson.dist(it, jt) == 
    90 		johnson.dist(it, johnson.predNode(it, jt)) +
    90 		johnson.dist(it, johnson.predNode(it, jt)) +
    91 		length[johnson.pred(it, jt)],
    91 		length[johnson.predEdge(it, jt)],
    92 		"Wrong edge in all pairs shortest path");
    92 		"Wrong edge in all pairs shortest path");
    93  	  check(fibJohnson.dist(it, jt) == 
    93  	  check(fibJohnson.dist(it, jt) == 
    94 		fibJohnson.dist(it, fibJohnson.predNode(it, jt)) +
    94 		fibJohnson.dist(it, fibJohnson.predNode(it, jt)) +
    95 		length[fibJohnson.pred(it, jt)],
    95 		length[fibJohnson.predEdge(it, jt)],
    96 		"Wrong edge in all pairs shortest path");
    96 		"Wrong edge in all pairs shortest path");
    97 	  check(floyd.dist(it, jt) == 
    97 	  check(floyd.dist(it, jt) == 
    98 		floyd.dist(it, floyd.predNode(it, jt)) +
    98 		floyd.dist(it, floyd.predNode(it, jt)) +
    99 		length[floyd.pred(it, jt)],
    99 		length[floyd.predEdge(it, jt)],
   100 		"Wrong edge in all pairs shortest path");
   100 		"Wrong edge in all pairs shortest path");
   101 	}
   101 	}
   102       }
   102       }
   103     }
   103     }
   104   }
   104   }