1 (* Copyright (C) 2009 Matthew Fluet.
2 * Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
3 * Jagannathan, and Stephen Weeks.
5 * MLton is released under a BSD-style license.
6 * See the file MLton-LICENSE for details.
9 signature FOREST_HEAP_STRUCTS =
11 structure Key: BOUNDED_ORDER
14 signature FOREST_HEAP =
16 include FOREST_HEAP_STRUCTS
21 val key: 'a t -> Key.t
27 val empty: unit -> 'a t
28 val insertLazy: 'a t * Key.t * 'a -> 'a Elt.t
29 val insertEager: 'a t * Key.t * 'a -> 'a Elt.t
30 val isEmpty: 'a t -> bool
31 val deleteMin: 'a t -> 'a
32 val decreaseKeySift: 'a t * 'a Elt.t * Key.t -> unit
33 val decreaseKeyCut: 'a t * 'a Elt.t * Key.t -> unit
34 val deleteSift: 'a t * 'a Elt.t -> unit
35 val deleteCut: 'a t * 'a Elt.t -> unit
36 val min: 'a t -> 'a Elt.t
37 val newEager: (Key.t * 'a) list -> 'a t
38 val newLazy: (Key.t * 'a) list -> 'a t
39 (* unions second heap into first, destroys second heap *)
40 val unionLazy: 'a t * 'a t -> unit
41 val unionEager: 'a t * 'a t -> unit