Author: abaine Date: Thu Aug 2 11:37:48 2007 New Revision: 104
Modified: trunk/funds/src/trees/avl.lisp Log: Renamed stitch-avl-tree.
Modified: trunk/funds/src/trees/avl.lisp ============================================================================== --- trunk/funds/src/trees/avl.lisp (original) +++ trunk/funds/src/trees/avl.lisp Thu Aug 2 11:37:48 2007 @@ -36,7 +36,7 @@ (defun balance (inside root outside &key heavy-side) (let ((other-side (other-side heavy-side))) (if (balanced-p inside outside) - (stitch-avl-nodes :root root + (stitch-avl-tree :root root heavy-side outside other-side inside) (rotate inside root @@ -50,15 +50,15 @@
(defun rotate (inside root outside &key side) (let* ((t1 (tree-child outside :side side)) - (new-inside (stitch-avl-nodes :root root + (new-inside (stitch-avl-tree :root root side inside (other-side side) t1)) (new-outside (tree-child outside :side (other-side side)))) - (stitch-avl-nodes :root outside + (stitch-avl-tree :root outside side new-inside (other-side side) new-outside)))
-(defun stitch-avl-nodes (&key root (key (bt-key root)) (value (bt-value root)) +(defun stitch-avl-tree (&key root (key (bt-key root)) (value (bt-value root)) (left (make-avl-leaf)) (right make-avl-leaf)) (make-instance 'avl-tree :key key :value value