Module Heap

module Heap: sig .. end
Heap implementation based on a pairing-heap.

This heap implementations supports an arbitrary element type, via a comparison function. If you need a heap with elements ordered by integers, then it may be more efficient to use a Timing_wheel.Priority_queue, which is a heap implementation specialized to integer keys, and with some other performance differences and usage restrictions.


include Heap_intf.S
module Removable: sig .. end
Removable augments a heap with the ability to remove elements from the heap in lg(n) (amortized) time at any point after they have been added.