Boost logo

Boost :

Subject: Re: [boost] [review] Heaps: mutability
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2011-06-04 14:27:03


AMDG

On 06/03/2011 09:33 AM, Tim Blechmann wrote:
> b.h supports two ways of updating nodes:
>
> 1: update(handle_type, value_type);
> 2: update(handle_type);
>
> the second version assumes that you change the priority manually, while the
> `update' call just fixes the heap.
>
> this is described in the `mutability' section, but i should probably improve the
> documentation. please note, that you *have* to call update before modifying any
> other node ...
>

Have you considered taking a page from MultiIndex?

bool replace(iterator position, const value_type& x);

bool modify(iterator position, Modifier mod);

Requires: Modifier is a model of Unary Function...

In Christ,
Steven Watanabe




Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk