class Quartz::FibonacciHeap(T)

Overview

Event set implemented as a Fibonacci Heap, as described by Fredman and Tarjan.

Structured as a collection of root trees that are min-heap ordered, and internally represented as a circular, doubly-linked list.

Defined in:

quartz/priority_queues/fibonacci_heap.cr

Constructors

Instance Method Summary

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) : self
new(&)
new

Instance methods inherited from class Reference

==(other : Quartz::Any) ==

Instance methods inherited from class Object

===(other : Quartz::Any) ===

Constructor Detail

def self.new(&comparator : Duration, Duration, Bool -> Int32) #

[View source]

Instance Method Detail

def clear #

Clears self.


[View source]
def delete(priority : Duration, value : T) : T #

[View source]
def empty? : Bool #

Whether the event set is empty or not.


[View source]
def inspect(io) #

[View source]
def next_priority : Duration #

[View source]
def peek : T #

[View source]
def peek? : T | Nil #

[View source]
def pop : T #

Dequeue and return the min element.


[View source]
def push(priority : Duration, value : T) #

Insert the given value with the specified priority into self..


[View source]
def size : Int32 #

Returns the number of elements in the heap.


[View source]