class

Quartz::HeapSet(T)

Inherits Quartz::PriorityQueue / Reference / Object

Event set based on a array-based min-heap similar to BinaryHeap, but optimized for higher event collision rate.

Instead of adding all events in the heap, simultaneous events are gathered and as a set in the heap.

To avoid O(n) complexity when deleting an arbitrary element, a map is used to store indices for each event in the event set.

Constructors

new(initial_capacity : Int, &comparator : Duration, Duration, Bool -> Int32)
Source

Instance methods

==(other : HeapSet) : Bool
Source
==(other) : Bool

Returns false (other can only be a Value here).

Source
clear
Source
delete(priority : Duration, event : T) : T | Nil
Source
empty?
Source
heapify!
Source
inspect(io)
Source
next_priority
Source
next_priority
Source
peek
Source
peek
Source
peek?
Source
pop_imminents
Source
push(priority : Duration, value : T) : self
Source
size

Returns the number of elements in the heap.

Source
to_a
Source
to_slice
Source