From ab8cc85adde879fb963c94d15675783f2cf4b183 Mon Sep 17 00:00:00 2001 From: dos-reis Date: Tue, 14 Aug 2007 05:14:52 +0000 Subject: Initial population. --- src/input/bags.input.pamphlet | 69 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 src/input/bags.input.pamphlet (limited to 'src/input/bags.input.pamphlet') diff --git a/src/input/bags.input.pamphlet b/src/input/bags.input.pamphlet new file mode 100644 index 00000000..b884079a --- /dev/null +++ b/src/input/bags.input.pamphlet @@ -0,0 +1,69 @@ +\documentclass{article} +\usepackage{axiom} +\begin{document} +\title{\$SPAD/src/input bags.input} +\author{The Axiom Team} +\maketitle +\begin{abstract} +\end{abstract} +\eject +\tableofcontents +\eject +\section{License} +<>= +--Copyright The Numerical Algorithms Group Limited 1994. +@ +<<*>>= +<> +a:Stack INT:= stack [1,2,3,4,5] +pop! a +a +push!(9,a) +a +empty? a +b:=empty()$(Stack INT) +empty? b +c:ArrayStack INT:= arrayStack [1,2,3,4,5] +pop! c +c +push!(9,c) +c +empty? c +d:=empty()$(ArrayStack INT) +empty? d +e:Queue INT:= queue [1,2,3,4,5] +dequeue! e +e +enqueue!(9,e) +e +empty? e +f:=empty()$(Queue INT) +empty? f +g:Dequeue INT:= dequeue [1,2,3,4,5] +extractBottom! g +g +insertBottom!(9,g) +g +extractTop! g +g +insertTop!(9,g) +g +empty? g +h:=empty()$(Dequeue INT) +empty? h +i:Heap INT := bag [1,6,3,7,5,2,4] +insert!(10,i) +i +max i +extract! i +i +heapsort x == + empty? x => [] + cons(extract! x,heapsort x) +heapsort i +@ +\eject +\begin{thebibliography}{99} +\bibitem{1} nothing +\end{thebibliography} +\end{document} -- cgit v1.2.3