Binary heap method to update an entry.

2010-12-15 Thread Matthias Walter
Hi all, I uploaded [1] a patch for std.container to use BinaryHeap as a priority queue. For the latter one it is often necessary to change a value (often called decreaseKey in a MinHeap). For example, Dijkstra's shortest path algorithm would need such a method. My implementation expects that the u

Re: Binary heap method to update an entry.

2010-12-16 Thread Andrei Alexandrescu
On 12/15/10 10:21 PM, Matthias Walter wrote: Hi all, I uploaded [1] a patch for std.container to use BinaryHeap as a priority queue. For the latter one it is often necessary to change a value (often called decreaseKey in a MinHeap). For example, Dijkstra's shortest path algorithm would need such

Re: Binary heap method to update an entry.

2010-12-16 Thread Matthias Walter
On 12/16/2010 04:17 AM, Andrei Alexandrescu wrote: > On 12/15/10 10:21 PM, Matthias Walter wrote: >> Hi all, >> >> I uploaded [1] a patch for std.container to use BinaryHeap as a priority >> queue. For the latter one it is often necessary to change a value (often >> called decreaseKey in a MinHeap)

Re: Binary heap method to update an entry.

2010-12-16 Thread Andrei Alexandrescu
On 12/16/10 7:55 AM, Matthias Walter wrote: On 12/16/2010 04:17 AM, Andrei Alexandrescu wrote: On 12/15/10 10:21 PM, Matthias Walter wrote: Hi all, I uploaded [1] a patch for std.container to use BinaryHeap as a priority queue. For the latter one it is often necessary to change a value (often

Re: Binary heap method to update an entry.

2010-12-16 Thread Matthias Walter
On 12/16/2010 10:53 AM, Andrei Alexandrescu wrote: > On 12/16/10 7:55 AM, Matthias Walter wrote: >> On 12/16/2010 04:17 AM, Andrei Alexandrescu wrote: >>> On 12/15/10 10:21 PM, Matthias Walter wrote: Hi all, I uploaded [1] a patch for std.container to use BinaryHeap as a priorit

Re: Binary heap method to update an entry.

2010-12-16 Thread Andrei Alexandrescu
On 12/16/10 10:06 AM, Matthias Walter wrote: On 12/16/2010 10:53 AM, Andrei Alexandrescu wrote: On 12/16/10 7:55 AM, Matthias Walter wrote: On 12/16/2010 04:17 AM, Andrei Alexandrescu wrote: On 12/15/10 10:21 PM, Matthias Walter wrote: Hi all, I uploaded [1] a patch for std.container to use

Re: Binary heap method to update an entry.

2010-12-17 Thread Pelle MÃ¥nsson
On 12/16/2010 04:53 PM, Andrei Alexandrescu wrote: On 12/16/10 7:55 AM, Matthias Walter wrote: On 12/16/2010 04:17 AM, Andrei Alexandrescu wrote: On 12/15/10 10:21 PM, Matthias Walter wrote: Hi all, I uploaded [1] a patch for std.container to use BinaryHeap as a priority queue. For the latter