class RBTreePQ

Public Class Methods

new() click to toggle source
# File benchmarks/sorted_set.rb, line 75
def initialize; @elements = RBTree.new end

Public Instance Methods

empty?() click to toggle source
# File benchmarks/sorted_set.rb, line 79
def empty?
    @elements.empty?
end
next() click to toggle source
# File benchmarks/sorted_set.rb, line 82
def next
    v, _ = @elements.shift
    if v.next
        @elements[v] = v
    end
    v
end
push(stream) click to toggle source
# File benchmarks/sorted_set.rb, line 76
def push(stream)
    @elements[stream] = stream
end