[ENH] Misc018-HeapIndexCallback
schwa at cc.gatech.edu
schwa at cc.gatech.edu
Mon Jun 30 04:47:43 UTC 2003
from preamble:
"Change Set: Misc018-HeapIndexCallback
Date: 17 March 2003
Author: Joshua Gargus
This changeset allows a block to be set that is evaluated whenever an
object's position in the heap is changed. The parameters to the block
are the object and the new index.
The motivation is to enable a Heap to be used as a dynamic priority
queue (one where the priorities of the events may change even after they
are added to the queue. When a priority is changed, the heap must be
updated. To do this efficiently, it must be possible to quickly find
the changed object in the heap. Without maintaining an index into the
heap, this process is O(n), which is not fast enough."!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Misc018-HeapIndexCallback.cs.gz
Type: application/octet-stream
Size: 2240 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20030629/f13160b0/Misc018-HeapIndexCallback.cs.obj
More information about the Squeak-dev
mailing list
|