Commit | Line | Data |
---|---|---|
7f918cf1 CE |
1 | (* Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh |
2 | * Jagannathan, and Stephen Weeks. | |
3 | * | |
4 | * MLton is released under a BSD-style license. | |
5 | * See the file MLton-LICENSE for details. | |
6 | *) | |
7 | ||
8 | functor EagerBinomialHeap(S: HEAP_STRUCTS): HEAP = | |
9 | struct | |
10 | ||
11 | open S | |
12 | ||
13 | structure Heap = ForestHeap(structure Key = Key) | |
14 | open Heap | |
15 | ||
16 | val new = newEager | |
17 | ||
18 | val insert = insertEager | |
19 | ||
20 | val decreaseKey = decreaseKeySift | |
21 | ||
22 | val delete = deleteSift | |
23 | ||
24 | val union = unionEager | |
25 | ||
26 | end | |
27 | ||
28 | functor LazyBinomialHeap(S: HEAP_STRUCTS): HEAP = | |
29 | struct | |
30 | ||
31 | open S | |
32 | ||
33 | structure Heap = ForestHeap(structure Key = Key) | |
34 | open Heap | |
35 | ||
36 | val new = newLazy | |
37 | ||
38 | val insert = insertLazy | |
39 | ||
40 | val decreaseKey = decreaseKeySift | |
41 | ||
42 | val delete = deleteSift | |
43 | ||
44 | val union = unionLazy | |
45 | ||
46 | end |