class

Quartz::CalendarQueue(T)

Inherits Quartz::PriorityQueue / Reference / Object

A fast O(1) priority queue implementation.

See paper: Brown, Randy. 1988. “Calendar Queues: a Fast 0(1) Priority Queue Implementation for the Simulation Event Set Problem.” Communications of the ACM 31 (10): 1220–27. doi:10.1145/63039.63045.

Constructors

new(last_priority : Quartz::Duration = Duration.new(0), bucket_count = 8, width : Quartz::Duration = Duration.new(Scale::FACTOR), &comparator : Duration, Duration, Bool -> Int32)
Source

Instance methods

clear
Source
delete(priority : Duration, event : T) : T | Nil
Source
empty?
Source
inspect(io)
Source
next_priority
Source
peek
Source
peek?
Source
pop?
Source
push(priority : Duration, value : T)
Source
resize(new_size)

Resize buckets to new_size.

Source
size

Returns the number of events.

Source
to_s(io)
Source