Crate interval_heap [] [src]

A double-ended priority queue implemented with an interval heap.

An IntervalHeap can be used wherever a BinaryHeap can, but has the ability to efficiently access the heap's smallest item and accepts custom comparators. If you only need access to either the smallest item or the greatest item, BinaryHeap is more efficient.

Insertion has amortized O(log n) time complexity. Popping the smallest or greatest item is O(log n). Retrieving the smallest or greatest item is O(1).

Structs

Drain

An iterator that drains an IntervalHeap in arbitrary oder.

IntervalHeap

A double-ended priority queue implemented with an interval heap.

IntoIter

A consuming iterator over an IntervalHeap in arbitrary order.

Iter

An iterator over an IntervalHeap in arbitrary order.