Subject: Re: [boost] [review] Heaps: mutability
From: Tim Blechmann (tim_at_[hidden])
Date: 2011-06-05 03:58:47
> > 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 modify(iterator position, Modifier mod);
i have been thinking about provinding an interface with a modifier function, but
to me it seems to increase the complexety of the interface ... but with c++0x
lambdas it may become more useful ...
other thoughts about this idea?
-- tim_at_[hidden] http://tim.klingt.org /"\ ASCII Ribbon Campaign \ / no HTML in email & vCards X no proprietary attachments / \ use open standards