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


Ignore:
Timestamp:
2016-05-29T23:04:29-07:00 (8 years ago)
Author:
Marek Rychlik
Message:

* empty log message *

File:
1 edited

Legend:

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

    r3926 r3927  
    5252              first second))))
    5353
    54 (defun make-pair-queue (pair-key-fn pair-order-fn)
    55   "Constructs a priority queue for critical pairs."
    56   (make-priority-queue
    57    :element-type 'critical-pair
    58    :element-key #'(lambda (pair) (funcall pair-key-fn (critical-pair-first pair) (critical-pair-second pair)))
    59    :test pair-order-fn))
     54(defclass selection-strategy ()
     55  ((pair-key-fn   :initform nil :initarg :pair-key-fn :accessor pair-key-fn)
     56   (pair-order-fn :initform nil :initarg :pair-order-fn :accessor pair-order-fn))
     57  (:documentation "Sets up variables *PAIR-KEY-FUNCTION* and *PAIR-ORDER* used
     58to determine the priority of critical pairs in the priority queue."))
     59
     60(defclass critical-pair-queue (selection-strategy)
     61  ((pq :initform (make-priority-queue
     62                  :element-type 'critical-pair
     63                  :element-key #'(lambda (pair) (funcall pair-key-fn (critical-pair-first pair) (critical-pair-second pair)))
     64                  :test pair-order-fn))))
    6065
    6166(defun pair-queue-initialize (pq f start
     
    8590  (priority-queue-empty-p b))
    8691
    87 (defclass selection-strategy ()
    88   ((pair-key-fn   :initform nil :initarg :pair-key-fn :accessor pair-key-fn)
    89    (pair-order-fn :initform nil :initarg :pair-order-fn :accessor pair-order-fn))
    90   (:documentation "Sets up variables *PAIR-KEY-FUNCTION* and *PAIR-ORDER* used
    91 to determine the priority of critical pairs in the priority queue."))
    9292
    9393(defun make-normal-strategy (monomial-order-fn)
Note: See TracChangeset for help on using the changeset viewer.