Author: abaine Date: Sun Aug 19 11:37:55 2007 New Revision: 153
Modified: trunk/funds/src/heap/heap.lisp trunk/funds/src/trees/classes.lisp Log: Moved heap classes from trees/classes.lisp to heap/heap.lisp.
Modified: trunk/funds/src/heap/heap.lisp ============================================================================== --- trunk/funds/src/heap/heap.lisp (original) +++ trunk/funds/src/heap/heap.lisp Sun Aug 19 11:37:55 2007 @@ -1,6 +1,16 @@
(in-package :funds)
+(defclass heap-leaf (leaf) + () + (:documentation "A leaf node of a heap.")) + +(defclass heap (binary-tree) + ((key :initarg :priority :reader heap-priority) + (left :initform (make-heap)) + (right :initform (make-heap)) + (weight :initarg :weight :initform 1 :reader heap-weight))) + (defun make-heap (&key (priority 0 p-p) value (left (make-heap-leaf)) (right (make-heap-leaf))) (if p-p
Modified: trunk/funds/src/trees/classes.lisp ============================================================================== --- trunk/funds/src/trees/classes.lisp (original) +++ trunk/funds/src/trees/classes.lisp Sun Aug 19 11:37:55 2007 @@ -45,13 +45,3 @@ (left :initform (make-avl-tree)) (right :initform (make-avl-tree))) (:documentation "A height-balanced binary tree.")) - -(defclass heap-leaf (leaf) - () - (:documentation "A leaf node of a heap.")) - -(defclass heap (binary-tree) - ((key :initarg :priority :reader heap-priority) - (left :initform (make-heap)) - (right :initform (make-heap)) - (weight :initarg :weight :initform 1 :reader heap-weight)))