Created
July 9, 2017 00:26
-
-
Save kunigami/dcda12c63e268c967ccf67deb0d65386 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(* | |
Binomial tree corresponding to a digit in the heap. | |
*) | |
type tree = Node of Element.t * tree list;; | |
type tv = Element.t | |
(* | |
A heap with n elements can be associated to the binary representation of | |
n. The 0's correspond to no tree, while the 1s in position i correspond to | |
trees with size 2^i | |
*) | |
type digit = Zero | One of tree;; | |
type schedule = digit stream list;; | |
type heap = { | |
digits: digit stream; | |
schedule: schedule; | |
};; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment