Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Size-indexed binomial heaps.
Documentation
A size-indexed binomial tree.
data Binomial :: Nat -> Nat -> * -> * where Source #
A size-indexed binomial heap.
The implementation is similar to:
- Hinze, Ralf. “Functional Pearls: Explaining Binomial Heaps.” Journal of Functional Programming 9, no. 1 (January 1999): 93–104. doi:10.1017/S0956796899003317.
- Wasserman, Louis. “Playing with Priority Queues.” The Monad.Reader, May 12, 2010.
However invariants are more aggressively maintained, using a typechecker plugin. It is a list of binomial trees, equivalent to a binary number (stored least-significant-bit first).