Quartz::BinaryHeap(T)
Inherits Quartz::PriorityQueue / Reference / Object
Event set implemented as an array-based heap.
Each inserted elements is given a certain priority, based on the result of the comparison. This is a min-heap, which means retrieving an element will always return the one with the highest priority.
To avoid O(n) complexity when deleting an arbitrary element, a map is used to store indices for each element in the event set.
Constructors
Instance methods
clear
Sourcedelete(priority : Duration, event : T) : T | Nil
Sourceempty?
Sourceheapify!
Sourceinspect(io)
Sourcenext_priority
Sourcenext_priority
Sourcepeek
Sourcepeek
Sourcepeek?
Sourcepop
Sourcepush(priority : Duration, value : T) : self
Sourceto_a
Sourceto_slice
Source