
16 Feb
2006
16 Feb
'06
3:37 p.m.
Hi, I am trying to calculate all pairs longest path withous any success using floyd-warshall in this way. floyd_warshall_all_pairs_shortest_paths(g, D, distance_compare(std::greater<int>()).distance_inf(std::numeric_limits<int>::min())); The problem seems to be the test within the three loops of floyd_warshall_dispatch. This function selects the minimum value using std::min instead of the maximal that would have been selected if the test had been implemented using compare. Is this a bug, or shouldn't it be possible to use the function like this? I have also found a problem in example/min_max_paths.cpp. The example tries to calculate the longest path in a graph with cycles of positive weight. Thanks, Peter