Author: abaine Date: Wed Jun 20 12:15:00 2007 New Revision: 27
Modified: trunk/funds/tests/trees/avl-tree-test.lisp Log: Changed a couple of comments.
Modified: trunk/funds/tests/trees/avl-tree-test.lisp ============================================================================== --- trunk/funds/tests/trees/avl-tree-test.lisp (original) +++ trunk/funds/tests/trees/avl-tree-test.lisp Wed Jun 20 12:15:00 2007 @@ -29,14 +29,14 @@ 2. the height of the right sub-tree is correct; 3. the height of the given tree is 1 more than the greater of the heights of the left and right sub-trees." - (if (avl-empty-p tree) - (zerop (avl-height tree)) - (and (height-correct-p (avl-left tree)) - (height-correct-p (avl-right tree)) + (or (and (avl-empty-p tree) + (zerop (avl-height tree))) ; (a) + (and (height-correct-p (avl-left tree)) ; (1) + (height-correct-p (avl-right tree)) ; (2) (let* ((a (avl-height (avl-left tree))) (b (avl-height (avl-right tree))) (c (if (> a b) a b))) - (eql (1+ c) (avl-height tree)))))) + (eql (1+ c) (avl-height tree)))))) ; (3)
(defun balanced-p (tree) "Whether the given AVL Tree is properly balanced. To be balanced,