close Warning: Can't synchronize with repository "(default)" (The repository directory has changed, you should resynchronize the repository with: trac-admin $ENV repository resync '(default)'). Look in the Trac log for more information.

Changeset 3990 for branches/f4grobner


Ignore:
Timestamp:
2016-05-30T21:05:44-07:00 (8 years ago)
Author:
Marek Rychlik
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/f4grobner/priority-queue.lisp

    r3989 r3990  
    5959    (heap-insert heap item test))))
    6060
    61 (defun priority-queue-remove (pq)
    62   (heap-remove (priority-queue-heap pq) (priority-queue-test pq)))
     61(defgeneric dequeue (self)
     62  (:method ((self priority-queue))
     63    (with-slots (heap test)
     64        self
     65      (heap-remove heap test))))
    6366
    64 (defun priority-queue-empty-p (pq)
    65   (heap-empty-p (priority-queue-heap pq)))
     67(defgeneric queue-empty-p (self)
     68  (:method ((self priority-queue))
     69    (with-slots (heap)
     70        self
     71      (heap-empty-p heap))))
    6672
    6773(defun priority-queue-size (pq)
Note: See TracChangeset for help on using the changeset viewer.