Crystalline::Containers::Heap(K, V)
Inherits Reference / Object
Constructors
new(comparator : K, K -> Bool = ->(x : K, y : K) do
(x <=> y) == -1
end)
SourceInstance methods
<<(key : K)
Sourcechange_key(key : K, new_key : K)
Sourceclear
Sourcedelete(key)
Sourcedelete_key(key)
Sourceempty?
Sourcehas_key?(key)
Sourcemerge!(other_heap : Heap(K, V))
Sourcenext
Sourcenext_key
Sourcepop
Sourcepush(key : K, value = key)
Sourcesize
Source