MinMaxHeap(T)
Inherits Enumerable < Struct < Value < Object
Constructors
new(initial_capacity : Int32 | Nil = nil, max_size : Int32 | Nil = nil)
if max_size is setted, when the heap size bigger than given size, the last element will be poped out.
new(initial_capacity : Int32 | Nil = nil, max_size : Int32 | Nil = nil, &block : T, T -> Int32)
Sourcenew(enumerable : Enumerable(T), max_size : Int32 | Nil = nil, &block : T, T -> Int32)
Sourcenew(enumerable : Enumerable(T), max_size : Int32 | Nil = nil)
SourceInstance methods
<<(elem)
Sourceeach(*args, **options)
Sourceeach(*args, **options, &)
Sourcemax_elem_index
Sourcepeek
Sourcepeek_first
Sourcepeek_last
Sourcepop
Sourcepop_first
Sourcepop_last
Sourcepush(elem : T)
Sourcesize(*args, **options)
Sourcesize(*args, **options, &)
Sourceto_json(*args, **options)
Sourceto_json(*args, **options, &)
Sourceto_s(*args, **options)
Sourceto_s(*args, **options, &)
Source