Debian Codegraph @

lib/mlrisc-lib/MLRISC/graphs/node-priqueue.sig

raw
1 (*
2 * This implements a priority queue for nodes in a graph
3 *
4 * -- Allen
5 *)
6
7 signature NODE_PRIORITY_QUEUE =
8 sig
9
10 type node_priority_queue
11
12 exception EmptyPriorityQueue
13
14 val create : int -> (Graph.node_id * Graph.node_id -> bool) ->
15 node_priority_queue
16 val fromGraph : (Graph.node_id * Graph.node_id -> bool) ->
17 ('n,'e,'g) Graph.graph -> node_priority_queue
18 val isEmpty : node_priority_queue -> bool
19 val clear : node_priority_queue -> unit
20 val min : node_priority_queue -> Graph.node_id
21 val deleteMin : node_priority_queue -> Graph.node_id
22 val decreaseWeight : node_priority_queue * Graph.node_id -> unit
23 val insert : node_priority_queue * Graph.node_id -> unit
24 end