From: Duncan Clarke (duncanclarke_at_[hidden])
Date: 2002-12-22 18:26:02
I downloaded the 1_29_0 version of Boost, compiled the file_dependencies.cpp
example, and when I run it, the sample program aborts after throwing
negative_edge in examine_edges(...) (from dijkstra_shortest_paths.cpp).
After a little investigation, it looks to me like examine_edges(...) is
supposed to protect against negative edge weights. It does so by calling
the user-supplied comparison function to test each edge to make sure its
weight is greater than the user-supplied zero value. But the call in
examine_edges(...) is coded so that "if (EdgeWeight ? 0) then throw
negative_edge()," where the example program uses the ">" operator for "?".
Seems to me that those parameters are presented in the wrong order.
I downloaded Boost 1_28_0 and the example compiled and ran without problems.
A quick diff showed that the code to test for negative edge weights is new
in BGL 1_29_0.
So... is it a feature or a bug?
I checked through all the boost newsgroups and couldn't find anything about
this, but I'm new to Boost, so forgive me (and point me to the resolution)
if this is a known problem.
Computer Science and Engineering
University of South Carolina
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk