|
Boost Users : |
From: Doug Gregor (dgregor_at_[hidden])
Date: 2006-08-10 09:57:11
On Aug 9, 2006, at 7:45 PM, Michael Barrientos wrote:
> Doug Gregor wrote:
>> On Aug 9, 2006, at 12:07 AM, Michael Barrientos wrote:
>>> I did some digging into the source, and found that when the
>>> Dijkstra's
>>> algorithm delegates to the Breadth First Search algorithm, it calls
>>> breadth_first_visit. However, only breadth_first_search calls
>>> initialize_vertex. Thus initialize vertex is never called.
>>
>> Yep, you're right.
>>
>>> For now, I've decided to work around it without patching BGL, but
>>> can
>>> this be fixed in a future version?
>>
>> It's been fixed for 1.34.0.
>>
>> Doug
>
> Reminder to self for the future: check the CVS to see if it's already
> fixed in the next release. However, it's not fixed the way I had hoped
> it would be.
>
> I had hoped that the fix would place the initialize_vertex call after
> the initialization of the color/distance/predecessor maps, like it
> is in
> 1.33.1 for BFS. I noticed that the fix in CVS places the initialize
> call
> before the initialization, and that the BFS/Astar/etc. have similarly
> moved the initialize_vertex call to before the color map
> initialization.
Unfortunately, the documented behavior has always been to call
initialize_vertex first. We've had bugs in the implementation, but
the documentation has been the same. I don't recall what prompted us
to move the initialize_vertex call, but I expect it was due to some
other user relying on an initial call to initialized_version :(
I think you'll probably need to use the no_init version. Sorry!
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