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 4148 for branches


Ignore:
Timestamp:
2016-06-02T22:03:57-07:00 (9 years ago)
Author:
Marek Rychlik
Message:

* empty log message *

File:
1 edited

Legend:

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

    r4146 r4148  
    100100polynomials is selected.")
    101101
    102 (defgeneric make-critical-pair-queue (object)
    103   (:documentation "A factory of critical-pair-queue objects.")
    104   (:method ((self selection-strategy))
    105     "Creates a priority queue with selection strategy STRATEGY."
     102(defclass critical-pair-queue (priority-queue)
     103  ()
     104  (:documentation "Specializes class PRIORITY-QUEUE to element-type CRITICAL-PAIR."))
     105
     106(defmethod initialize-instance :before ((self critical-pair-queue) &key)
     107  (call-next-method self :initial-element 'critical-pair))
     108
     109(defgeneric make-critical-pair-queue (object)
     110  (:method ((object selection-strategy))
    106111    (with-slots (pair-key-fn pair-order-fn)
    107         strategy
    108       (make-instance 'pair-queue
     112        object
     113      (make-instance 'priority-queue
    109114                     :element-type 'critical-pair
    110115                     :element-key #'(lambda (pair) (funcall pair-key-fn
Note: See TracChangeset for help on using the changeset viewer.