[funds-cvs] r156 - in trunk/funds/src: heap trees

abaine at common-lisp.net abaine at common-lisp.net
Sun Aug 19 16:07:16 UTC 2007


Author: abaine
Date: Sun Aug 19 12:07:15 2007
New Revision: 156

Modified:
   trunk/funds/src/heap/heap.lisp
   trunk/funds/src/trees/tree-weight.lisp
Log:
Moved heap functions to heap folder.

Modified: trunk/funds/src/heap/heap.lisp
==============================================================================
--- trunk/funds/src/heap/heap.lisp	(original)
+++ trunk/funds/src/heap/heap.lisp	Sun Aug 19 12:07:15 2007
@@ -5,7 +5,7 @@
   ()
   (:documentation "A leaf node of a heap."))
 
-(defconstant +heap-leaf+ (make-instance 'heap-leaf))
+(defvar +heap-leaf+ (make-instance 'heap-leaf))
 
 (defun make-heap-leaf ()
   +heap-leaf+)
@@ -32,3 +32,6 @@
 	     :value (bt-value root)
 	     :left left
 	     :right right))
+
+(defmethod tree-weight ((tree heap))
+  (heap-weight tree))

Modified: trunk/funds/src/trees/tree-weight.lisp
==============================================================================
--- trunk/funds/src/trees/tree-weight.lisp	(original)
+++ trunk/funds/src/trees/tree-weight.lisp	Sun Aug 19 12:07:15 2007
@@ -28,5 +28,3 @@
   (+ 1 (tree-weight (bt-left tree))
      (tree-weight (bt-right tree))))
 
-(defmethod tree-weight ((tree heap))
-  (heap-weight tree))



More information about the Funds-cvs mailing list