Brian Schröäer wrote:
> I have not looked very deep into rbtree. Maybe it is possible to
> implement a priority queue on top of rbtree. But generally it seems
> inverse to a priority queue. It orders by key, while a priority queue
> orders by priority (value in hash terms).

I've been using this PriorityQueue based on rbtree:

http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/133202

but, Brian, your implementation sounds like it is better suited to being
a priority queue. Also, I think you said there is a pure ruby as well as
extension version of it, which is useful in some situations. I will
check it out when I get a chance, and maybe do some benchmarks.

-- 
      vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407