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 4144


Ignore:
Timestamp:
2016-06-02T19:29:52-07:00 (9 years ago)
Author:
Marek Rychlik
Message:

* empty log message *

File:
1 edited

Legend:

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

    r4143 r4144  
    9999polynomials is selected.")
    100100
    101 (defclass critical-pair-queue (priority-queue)
    102   ()
    103   (:documentation "Implements critical pair priority queue."))
    104 
    105 (defmethod initialize-instance :after ((self critical-pair-queue) &key (strategy +normal-strategy+))
    106   "Initializes a priority queue SELF for critical pairs from strategy SELF."
    107   (with-slots (pair-key-fn pair-order-fn)
    108       strategy
    109     (call-next-method self
    110                       :element-type 'critical-pair
    111                       :element-key #'(lambda (pair) (funcall pair-key-fn
    112                                                              (critical-pair-first pair)
    113                                                              (critical-pair-second pair)))
    114                       :test pair-order-fn)))
     101(defgeneric make-critical-pair-queue (object)
     102  (:documentation "A factory of critical-pair-queue objects.")
     103  (:method ((self strategy))
     104    "Creates a priority queue with selection strategy STRATEGY."
     105    (with-slots (pair-key-fn pair-order-fn)
     106        strategy
     107      (make-instance 'pair-queue
     108                     :element-type 'critical-pair
     109                     :element-key #'(lambda (pair) (funcall pair-key-fn
     110                                                            (critical-pair-first pair)
     111                                                            (critical-pair-second pair)))
     112                     :test pair-order-fn))))
    115113
    116114(defun make-critical-pairs (poly-list &optional (start 0)
Note: See TracChangeset for help on using the changeset viewer.