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


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

* empty log message *

File:
1 edited

Legend:

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

    r4142 r4143  
    3030           "+MIN-TOTAL-DEGREE-STRATEGY+"
    3131           "+MIN-COMBINED-LENGTH-STRATEGY+"
    32            "MAKE-CRITICAL-PAIR-QUEUE"
     32           "MAKE-CRITICAL-PAIRS"
    3333           )
    3434  (:documentation "Critical pair queue implementation. The pair queue is a list of critical
     
    103103  (:documentation "Implements critical pair priority queue."))
    104104
    105 (defmethod initialize-instance :after ((self critical-pair-queue) &key strategy poly-list start)
    106   "Allocates a priority queue SELF for critical pairs from strategy SELF."
    107   (declare (ignore poly-list start))
     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."
    108107  (with-slots (pair-key-fn pair-order-fn)
    109108      strategy
    110109    (call-next-method self
    111                            :element-type 'critical-pair
    112                            :element-key #'(lambda (pair) (funcall pair-key-fn
    113                                                                   (critical-pair-first pair)
    114                                                                   (critical-pair-second pair)))
    115                            :test pair-order-fn)))
     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)))
    116115
    117116(defun make-critical-pairs (poly-list &optional (start 0)
     
    126125                   (makelist (make-instance 'critical-pair :first (elt poly-list i) :second (elt poly-list j))
    127126                             (i start (1- s)) (j (1+ i) s))))
    128 #|
    129127
    130       (dolist (pair b self)
    131         (enqueue self pair)))))
    132 |#
     128(defgeneric enqueue-critical-pairs (self pair-lst)
     129  (:method ((self critical-pair-queue) pair-lst)
     130    (dolist (pair pair-lst self)
     131      (enqueue self pair))))
    133132
Note: See TracChangeset for help on using the changeset viewer.