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


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

* empty log message *

File:
1 edited

Legend:

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

    r4161 r4162  
    112112  self)
    113113
    114 (defgeneric make-critical-pair-queue (object)
    115   (:documentation "Creates a CRITICAL-PAIR-QUEUE from an object OBJECT.")
    116   (:method ((object selection-strategy))
    117     (with-slots (pair-key-fn pair-order-fn)
    118         object
    119       (make-instance 'critical-pair-queue
    120                      :element-key #'(lambda (pair) (funcall pair-key-fn
    121                                                             (critical-pair-first pair)
    122                                                             (critical-pair-second pair)))
    123                      :test pair-order-fn))))
    124 
    125114(defun make-critical-pairs (poly-list
    126115                            &optional (start 0)
     
    141130      (enqueue self pair))))
    142131
     132
     133(defgeneric make-critical-pair-queue (object &optional poly-lst start)
     134  (:documentation "Creates a CRITICAL-PAIR-QUEUE from an object OBJECT.")
     135  (:method ((object selection-strategy) &optional (poly-lst nil) (start 0))
     136    (with-slots (pair-key-fn pair-order-fn)
     137        object
     138      (make-instance 'critical-pair-queue
     139                     :element-key #'(lambda (pair)
     140                                      (funcall pair-key-fn
     141                                               (critical-pair-first pair)
     142                                               (critical-pair-second pair)))
     143                     :test pair-order-fn))))
     144
Note: See TracChangeset for help on using the changeset viewer.