BinaryHeap is a range so it goes in std.range. Agree?
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Wed Jun 9 08:32:05 PDT 2010
On 06/09/2010 10:13 AM, Simen kjaeraas wrote:
> Andrei Alexandrescu <SeeWebsiteForEmail at erdani.org> wrote:
>
>> The problem is that operating on a range as a heap is not just one
>> operation (i.e. heapify), it's a handful of them. STL took the
>> approach of providing make_heap, push_heap, pop_heap, sort_heap, and
>> is_heap. Their use is quite clunky. I think that's too unstructured an
>> approach and would like to improve on it.
>
> I might have mixed up names here. I meant heapify not as the operation,
> but as in 'turn this into a heap'.
Yes, but does that operation yield an object of a new type, or is just
like STL's make_heap?
Andrei
More information about the Digitalmars-d
mailing list