Boost logo

Boost Users :

From: Doug Gregor (dgregor_at_[hidden])
Date: 2005-04-22 17:06:27


On Apr 5, 2005, at 2:26 PM, Peter Kümmel wrote:

> Hello,
>
> here maybe a small correction for
> boost_1_32_0\libs\graph\example\file_dependencies.cpp,
> line 176 :
>
> dijkstra_shortest_paths_no_init
> (g, *i, &pred[0], &time[0], weight, indexmap,
> - compare, combine, 0, // Since we are using > instead of >, we
> + compare, combine, //0, // Since we are using > instead of >, we
> (std::numeric_limits<int>::max)(), // flip 0 and inf.
> default_dijkstra_visitor());
>
>
> And I don't understand the comment '> instead of >' or what means '>,'
> ???
> If I compile with zero distance the program crashes, although the
> declaration is:

I think the example itself might be incorrect. The comment should have
started with "Since we are using > instead of <". However, there's a
bug report in the SourceForge tracker filed against this example that
asserts that using the shortest paths algorithm doesn't do what we
want. I don't quite have time now to really understand this example,
but it's possible that there is a problem with it.

        Doug


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