Changeset 4150 for branches/f4grobner
- Timestamp:
- 2016-06-02T23:39:40-07:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/f4grobner/priority-queue.lisp
r4149 r4150 48 48 49 49 50 (defmethod initialize-instance :a fter((self priority-queue)50 (defmethod initialize-instance :around ((self priority-queue) 51 51 &key 52 52 (test #'<=) 53 53 (element-key #'identity)) 54 (format t "PRIORITY-QUEUE::INITIALIZE-INSTANCE :AROUND~%") 54 "Fill in the HEAP slot with an instance of a heap. NOTE: This has to 55 be an :AROUND method, so that the slot ELEMENT-TYPE can be 56 initialized in a BEFORE method of a subclass of PRIORITY-QUEUE." 55 57 (with-slots (heap (test-x test) element-type) 56 58 (call-next-method) 59 (inspect self) 57 60 (setf heap (make-heap :element-type element-type) 58 test-x #'(lambda (x y) (funcall test (funcall element-key y) (funcall element-key x))))) 61 test-x #'(lambda (x y) (funcall test (funcall element-key y) (funcall element-key x)))) 62 (inspect self)) 59 63 self) 60 64
Note:
See TracChangeset
for help on using the changeset viewer.