aboutsummaryrefslogtreecommitdiff
path: root/src/input/bags.input.pamphlet
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2007-08-14 05:14:52 +0000
committerdos-reis <gdr@axiomatics.org>2007-08-14 05:14:52 +0000
commitab8cc85adde879fb963c94d15675783f2cf4b183 (patch)
treec202482327f474583b750b2c45dedfc4e4312b1d /src/input/bags.input.pamphlet
downloadopen-axiom-ab8cc85adde879fb963c94d15675783f2cf4b183.tar.gz
Initial population.
Diffstat (limited to 'src/input/bags.input.pamphlet')
-rw-r--r--src/input/bags.input.pamphlet69
1 files changed, 69 insertions, 0 deletions
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}
+<<license>>=
+--Copyright The Numerical Algorithms Group Limited 1994.
+@
+<<*>>=
+<<license>>
+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}