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 4150 for branches/f4grobner


Ignore:
Timestamp:
2016-06-02T23:39:40-07:00 (8 years ago)
Author:
Marek Rychlik
Message:

* empty log message *

File:
1 edited

Legend:

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

    r4149 r4150  
    4848
    4949
    50 (defmethod initialize-instance :after ((self priority-queue)
     50(defmethod initialize-instance :around ((self priority-queue)
    5151                                       &key
    5252                                         (test #'<=)
    5353                                         (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."
    5557  (with-slots (heap (test-x test) element-type)
    5658      (call-next-method)
     59    (inspect self)
    5760    (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))
    5963  self)
    6064 
Note: See TracChangeset for help on using the changeset viewer.