[Python-Dev] Priority queue (binary heap) python code
Greg Ewing
greg@cosc.canterbury.ac.nz
Tue, 25 Jun 2002 17:28:36 +1200 (NZST)
Skip Montanaro <skip@pobox.com>:
> I don't know how efficient it would be, but I usually think that most
> applications have a small, fixed set of possible priorities
Some applications of priority queues are like that,
but others aren't -- e.g. an event queue in a discrete
event simulation, where events are ordered by time.
I expect that's the sort of application Kevin had
in mind.
Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury, | A citizen of NewZealandCorp, a |
Christchurch, New Zealand | wholly-owned subsidiary of USA Inc. |
greg@cosc.canterbury.ac.nz +--------------------------------------+