[BGL]Repost? Problems in the shortest pair algorithms.

Hi, sorry if this is a repost. I made this post through the nntp at gmane, but it never appeared in my mail. I have reported some problems with the johnson_all_pairs_shortest_paths and floyd_warshall_all_pairs_shortest_paths algorithms. What is the correct way to report these problems. I made some posts to the list last week, but didn't get any response. Perhaps this should go on the developer mailing list instead? However, the problems I have noticed are: Floyd-Warshall: 1. std::min is used instead of the functor passed to as teh distance_compare parameter at several places 2. The distance map is initialized with 0 instead of zero. Johnson: 3. std::numeric_limits<DT>::max() is used instead of the distance_inf parameter. 4. The distance_combine and distance_compare parameters are not used. The bellman_ford_shortest_paths algorithm is called with std::less and closed_plus. Thanks Peter

Peter Gerell wrote:
However, the problems I have noticed are: Floyd-Warshall: 1. std::min is used instead of the functor passed to as teh distance_compare parameter at several places 2. The distance map is initialized with 0 instead of zero.
Johnson: 3. std::numeric_limits<DT>::max() is used instead of the distance_inf parameter. 4. The distance_combine and distance_compare parameters are not used. The bellman_ford_shortest_paths algorithm is called with std::less and closed_plus.
You're right, there exist problems you noticed. Are you able to fix it? If not, I can try to do it at the end of week. -- Regards, Janusz

Janusz Piwowarski wrote:
Peter Gerell wrote:
However, the problems I have noticed are: Floyd-Warshall: 1. std::min is used instead of the functor passed to as teh distance_compare parameter at several places 2. The distance map is initialized with 0 instead of zero.
Johnson: 3. std::numeric_limits<DT>::max() is used instead of the distance_inf parameter. 4. The distance_combine and distance_compare parameters are not used. The bellman_ford_shortest_paths algorithm is called with std::less and closed_plus.
You're right, there exist problems you noticed. Are you able to fix it? If not, I can try to do it at the end of week.
Thank you, I don't think I have enough insight into the design of the library and the rational for some implementation decisions to submit changes myself. However I would look forward review any changes you make and test them against my code. In short I think that the algorithms should never call the std::less<T>, std::min<T>, std::max<T>, std::numeric_limit<T>::min, std::numeric_limits<T>::max, std::plus<T> or closed_plus<T> directly, only as default values to the named parameters. Regards, Peter
participants (2)
-
Janusz Piwowarski
-
Peter Gerell