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


Ignore:
Timestamp:
2015-06-05T13:39:08-07:00 (10 years ago)
Author:
Marek Rychlik
Message:

* empty log message *

File:
1 edited

Legend:

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

    r144 r162  
    9898(defun pair-queue-empty-p (b)
    9999  (priority-queue-empty-p b))
     100
     101(defun set-pair-heuristic (method)
     102  "Sets up variables *PAIR-KEY-FUNCTION* and *PAIR-ORDER* used
     103to determine the priority of critical pairs in the priority queue."
     104  (ecase method
     105    ((sugar :sugar $sugar)
     106     (setf *pair-key-function* #'sugar-pair-key
     107           *pair-order* #'sugar-order))
     108;     ((minimal-mock-spoly :minimal-mock-spoly $minimal_mock_spoly)
     109;      (setf *pair-key-function* #'mock-spoly
     110;          *pair-order* #'mock-spoly-order))
     111    ((minimal-lcm :minimal-lcm $minimal_lcm)
     112     (setf *pair-key-function* #'(lambda (p q)
     113                                   (monom-lcm (poly-lm p) (poly-lm q)))
     114           *pair-order* #'reverse-monomial-order))
     115    ((minimal-total-degree :minimal-total-degree $minimal_total_degree)
     116     (setf *pair-key-function* #'(lambda (p q)
     117                                   (monom-total-degree
     118                                    (monom-lcm (poly-lm p) (poly-lm q))))
     119           *pair-order* #'<))
     120    ((minimal-length :minimal-length $minimal_length)
     121     (setf *pair-key-function* #'(lambda (p q)
     122                                   (+ (poly-length p) (poly-length q)))
     123           *pair-order* #'<))))
     124
Note: See TracChangeset for help on using the changeset viewer.