[Cl-heap-cvs] r7 - cl-heap/trunk
Rudy Neeser
rneeser at common-lisp.net
Thu Jun 18 16:37:41 UTC 2009
Author: rneeser
Date: Thu Jun 18 12:37:41 2009
New Revision: 7
Log:
Fixed an array size bug.
Added:
cl-heap/trunk/ChangeLog
Modified:
cl-heap/trunk/fibonacci-heap.lisp
Added: cl-heap/trunk/ChangeLog
==============================================================================
--- (empty file)
+++ cl-heap/trunk/ChangeLog Thu Jun 18 12:37:41 2009
@@ -0,0 +1,6 @@
+2009-06-18 Rudy Neeser <rudy.neeser at gmail.com>
+
+ * fibonacci-heap.lisp (pop-heap): Fixed a bug which created an
+ array one size too small, causing POP-HEAP operations to
+ intermittently fail.
+
Modified: cl-heap/trunk/fibonacci-heap.lisp
==============================================================================
--- cl-heap/trunk/fibonacci-heap.lisp (original)
+++ cl-heap/trunk/fibonacci-heap.lisp Thu Jun 18 12:37:41 2009
@@ -260,7 +260,7 @@
(concatenate-node-lists root (node-child root))
(setf root (delete-node root))
(when root
- (let ((ranks (make-array (ceiling (log count 2)) :initial-element nil))
+ (let ((ranks (make-array (1+ (ceiling (log count 2))) :initial-element nil))
(min nil))
;; Merge all trees of the same rank.
(labels ((sort-node (node)
More information about the Cl-heap-cvs
mailing list