Boost logo

Boost Users :

Subject: Re: [Boost-users] BGL: d_ary_heap_indirect duplicated values
From: Jeremiah Willcock (jewillco_at_[hidden])
Date: 2012-09-05 12:32:02


On Wed, 5 Sep 2012, Alex Hagen-Zanker wrote:

> On 05/09/2012 16:14, David Doria wrote:
>> but the output is still really wacky
>
> I am not sure, but it appears that when you update the priority of a vertex,
> it might just as well be an increased or a decreased priority.
>
> The algorithm on the other hand appears to expect that priorities only
> increase.
>
> update() as well as push_or_update() only call
> preserve_heap_property_up(index) and not preserve_heap_property_down(index).
>
> Again, I am not sure... do check.
>
> I would like the heap to remain copyable!

I couldn't make it noncopyable (some code in BGL relies on that), but
there is a warning at the top of the file about what will happen if you
try to do a copy. As long as you follow the rules listed there, it should
work. It really should be move-only in C++11, since that is always safe.

-- Jeremiah Willcock


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