An alternate implementation of a priority queue based on a Fibonacci heap.
Fibonacci heaps, while not quite as internally functional as pairing heaps, are generally less ad-hoc and may prove useful for some uses (as well as serving as a useful testbed). A Fibonacci heap can be thought of as a lazier binomial heap, designed to better take advantage of the fact that in a lazy language a series of modification operations will likely all be computed at once, preferably as late as possible. The Fibonacci heap supports all Queuelike operations with the same time complexity as PQueue.
|