[cl-containers-devel] Problems with priority queues

Gary King gwking at metabang.com
Fri Apr 27 02:30:35 UTC 2007


Hi Josip,

Thanks for your clear instructions on how to recreate this bug (and  
it's definitely a CL-Containers problem, not anything that you're  
doing wrong).

It looks to me as if the first-element methods for priority-queue-on- 
container are screwed up. Since the first-element call to the  
container of the priority-queue-on-container will return an element  
(not a node), it makes no sense to call element again. In short,  
instead of

> (defmethod first-element ((q priority-queue-on-container))
>   (element (first-element (container q))))

it should be

> (defmethod first-element ((q priority-queue-on-container))
>   (first-element (container q)))
>
> (defmethod (setf first-element) (value (q priority-queue-on- 
> container))
>   (setf (first-element (container q)) value))

I should be able to get this out sometime tomorrow.

thanks again,
--
Gary Warren King, metabang.com
Cell: (413) 885 9127
Fax: (206) 338-4052
gwkkwg on Skype * garethsan on AIM







More information about the cl-containers-devel mailing list