Pqueue
Module Pqueue
: priority queues.
This module implements priority queues, given a total ordering function over the elements inserted. All operations are purely applicative (no side effects). The implementation uses binomial queues from Chris Okasaki. "add", "take" and "union" are in o(log n) in the worst case.
module type OrderedType = sig ... end
The input signature of the functor Pqueue.Make
. t
is the type of the inserted elements. leq
is a total ordering function over the elements. This is a two-argument function f
returning True
if the first argument is less or equal to the second one.
module type S = sig ... end
Output signature for priority queue