Handbook
Glossary
avl
AVL trees
Next:
<avl> ( -- tree )
Vocabulary
trees
.
avl
Class description
This is the class for AVL trees. These conform to the assoc protocol and have efficient (logarithmic time) storage and retrieval operations.
Definition
USING:
trees
;
IN:
trees.avl
TUPLE:
avl
<
tree
;
Methods
USING:
assocs
kernel
trees.avl
;
M:
avl
assoc-like
drop
dup
avl?
[
>avl
]
unless
;
USING:
accessors
assocs
kernel
trees.avl
trees.avl.private
trees.private
;
M:
avl
delete-at
[
avl-delete
nip
swap
]
change-root
swap
[
dup
dec-count
]
when
drop
;
USING:
assocs
kernel
trees.avl
;
M:
avl
new-assoc
2drop
<avl>
;
USING:
kernel
prettyprint.custom
trees.avl
;
M:
avl
pprint-delims
drop
\
AVL{
\
}
;
USING:
accessors
assocs
kernel
trees.avl
trees.avl.private
trees.private
;
M:
avl
set-at
[
avl-set
nip
swap
]
change-root
swap
[
dup
inc-count
]
when
drop
;