Boost logo

Boost Users :

From: Peter Gerell (boost_at_[hidden])
Date: 2006-02-16 10:37:18


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


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net