On Tuesday 20 March 2007 04:52, Matthias Hopf wrote: > On Mar 19, 07 15:36:43 -0700, Randall R Schulz wrote: > ... > > What exactly do you refer to as a priority queue? Queues can be > implemented in a number of different ways...
A priority queue is one in which the items bear priority values (usually numeric, but requiring only a total ordering). When removing items from a priority queue the entry with the smallest (or largest) priority value is the one removed. Items may be inserted with priority values in an arbitrary order. Usually insertion is interleaved with removal. Common uses are time-based / event simulation (where time is the priority value) or heuristic search (in which case heuristic figures of merit constitute the priority value). The classic means of implementing a Priority Queue is with a binary heap, and it is very efficient. It does not, however, maintain the insertion order of entries with equal priority values. > Matthias Randall Schulz -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
