# node-priority-queue.api
# This implements a priority queue for nodes in a graph
#
# -- Allen Leung
# Compiled by:
#
src/lib/graph/graphs.libstipulate
package odg = oop_digraph; # oop_digraph is from
src/lib/graph/oop-digraph.pkgherein
api Node_Priority_Queue {
#
Node_Priority_Queue;
exception EMPTY_PRIORITY_QUEUE;
create: Int -> ((odg::Node_Id, odg::Node_Id) -> Bool) -> Node_Priority_Queue;
from_graph: ((odg::Node_Id, odg::Node_Id) -> Bool) -> odg::Digraph(N,E,G) -> Node_Priority_Queue;
is_empty: Node_Priority_Queue -> Bool;
clear: Node_Priority_Queue -> Void;
min: Node_Priority_Queue -> odg::Node_Id;
delete_min: Node_Priority_Queue -> odg::Node_Id;
decrease_weight: (Node_Priority_Queue, odg::Node_Id) -> Void;
set: (Node_Priority_Queue, odg::Node_Id) -> Void;
};
end;