class Quartz::CalendarQueue(T)
- Quartz::CalendarQueue(T)
- Quartz::PriorityQueue(T)
- Reference
- Object
Overview
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.
Defined in:
quartz/priority_queues/calendar_queue.crConstructors
Instance Method Summary
- #clear
- #delete(priority : Duration, event : T) : T | Nil
- #empty? : Bool
- #inspect(io)
- #next_priority : Duration
- #peek : T
- #peek? : T | Nil
- #pop : T
- #pop? : T | Nil
- #print_buckets(le_than : Duration)
- #push(priority : Duration, value : T)
-
#resize(new_size)
Resize buckets to new_size.
-
#size : Int32
Returns the number of events.
- #to_s(io)
Instance methods inherited from class Quartz::PriorityQueue(T)
clear
clear,
delete(priority : Duration, value : T) : T | Nil
delete,
empty? : Bool
empty?,
next_priority : Duration
next_priority,
peek : T
peek,
peek? : T | Nil
peek?,
pop : T
pop,
pop_imminents(&)
pop_imminents,
push(priority : Duration, value : T)
push,
size : Int
size
Constructor methods inherited from class Quartz::PriorityQueue(T)
new(priority_queue : Symbol, &comparator : Duration, Duration, Bool -> Int32) : selfnew(&) new
Instance methods inherited from class Reference
==(other : Quartz::Any)
==
Instance methods inherited from class Object
===(other : Quartz::Any)
===
Constructor Detail
def self.new(last_priority : Quartz::Duration = Duration.new(0), bucket_count = 8, width : Quartz::Duration = Duration.new(Scale::FACTOR), &comparator : Duration, Duration, Bool -> Int32)
#