digitalmars.D.learn - growable BinaryHeap
- Matthias Frei (13/13) Nov 18 2011 Hi guys,
Hi guys, does anybody know how to use std.container.BinaryHepa as a growable heap? Using T[] as Store is annoying since one has to do T[] store = heap.release(); store ~= newElement; heap.acquire(store); to insert an element into the heap, as BinaryHeap is not able to append to ranges. Using Array!(T) does not work neither because of Bug 6959. I tried to define the method insertBack() for T[] but I failed. What kind of data structure can I use, without having to write a an array myself? Thank you!
Nov 18 2011