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


Ignore:
Timestamp:
2016-05-29T21:59:49-07:00 (9 years ago)
Author:
Marek Rychlik
Message:

* empty log message *

File:
1 edited

Legend:

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

    r3921 r3922  
    5353              first second))))
    5454
    55  
    56 (defun make-pair-queue ()
     55(defun make-pair-queue (pair-key-fn pair-order-fn)
    5756  "Constructs a priority queue for critical pairs."
    5857  (make-priority-queue
    59    :element-type 'pair
    60    :element-key #'(lambda (pair) (funcall *pair-key-function* (pair-first pair) (pair-second pair)))
    61    :test *pair-order*))
     58   :element-type 'critical-pair
     59   :element-key #'(lambda (pair) (funcall pair-key-fn (critical-pair-first pair) (critical-pair-second pair)))
     60   :test pair-order-fn))
    6261
    6362(defun pair-queue-initialize (pq f start
     
    8786  (priority-queue-empty-p b))
    8887
    89 (defun set-pair-heuristic (method)
    90   "Sets up variables *PAIR-KEY-FUNCTION* and *PAIR-ORDER* used
    91 to determine the priority of critical pairs in the priority queue."
     88(defclass selection-strategy ()
     89  (:documentation "Sets up variables *PAIR-KEY-FUNCTION* and *PAIR-ORDER* used
     90to determine the priority of critical pairs in the priority queue.")
     91  ((pair-key-fn :initform nil :accessor pair-key-fn)
     92   (pair-order-fn :initform nil :
     93
    9294  (ecase method
    9395    ((minimal-lcm :minimal-lcm $minimal_lcm)
Note: See TracChangeset for help on using the changeset viewer.