aboutsummaryrefslogtreecommitdiff
path: root/src/input/bstree.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/bstree.input.pamphlet
downloadopen-axiom-ab8cc85adde879fb963c94d15675783f2cf4b183.tar.gz
Initial population.
Diffstat (limited to 'src/input/bstree.input.pamphlet')
-rw-r--r--src/input/bstree.input.pamphlet37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/input/bstree.input.pamphlet b/src/input/bstree.input.pamphlet
new file mode 100644
index 00000000..2a190caf
--- /dev/null
+++ b/src/input/bstree.input.pamphlet
@@ -0,0 +1,37 @@
+\documentclass{article}
+\usepackage{axiom}
+\begin{document}
+\title{\$SPAD/src/input BSTREE.input}
+\author{The Axiom Team}
+\maketitle
+\begin{abstract}
+\end{abstract}
+\eject
+\tableofcontents
+\eject
+<<*>>=
+
+
+-- Input generated from BinarySearchTreeXmpPage
+)clear all
+
+lv := [8,3,5,4,6,2,1,5,7]
+t := binarySearchTree lv
+emptybst := empty()$BSTREE(INT)
+t1 := insert!(8,emptybst)
+insert!(3,t1)
+leaves t
+split(3,t)
+insertRoot: (INT,BSTREE INT) -> BSTREE INT
+insertRoot(x, t) ==
+ a := split(x, t)
+ node(a.less, x, a.greater)
+buildFromRoot ls == reduce(insertRoot,ls,emptybst)
+rt := buildFromRoot reverse lv
+(t = rt)@Boolean
+@
+\eject
+\begin{thebibliography}{99}
+\bibitem{1} nothing
+\end{thebibliography}
+\end{document}