pq.sa
Generated by gen_html_sa_files from ICSI. Contact gomes@icsi.berkeley.edu for details
---------------------------> Sather 1.1 source file <--------------------------
-- Copyright (C) 1995, International Computer Science Institute
-- $Id: pq.sa,v 1.3 1996/04/09 10:05:20 borisv Exp $
--
-- COPYRIGHT NOTICE: This code is provided WITHOUT ANY WARRANTY
-- and is subject to the terms of the SATHER LIBRARY GENERAL PUBLIC
-- LICENSE contained in the file: Sather/Doc/License of the
-- Sather distribution. The license is also available from ICSI,
-- 1947 Center St., Suite 600, Berkeley CA 94704, USA.
abstract class $PQ{T < $IS_LT{T}} < $DISPENSER{T}
abstract class $PQ{T < $IS_LT{T}} < $DISPENSER{T} is
-- Standard priority queue abstraction. Returns the element with
-- the highest priority
top: T;
-- Return the top element of the queue.
pop: T;
-- Remove and return the top most element (alias for "remove")
insert(e: T);
-- Insert the element "e" into the priority queue
clear;
-- Remove all elements from the queue
is_empty: BOOL;
-- Return true if the queue is empty
end;