Changeset 3910
- Timestamp:
- 2016-05-29T20:08:59-07:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/f4grobner/pair-queue.lisp
r3909 r3910 27 27 28 28 (defpackage "PAIR-QUEUE" 29 (:use :cl :priority-queue :monom ial :order:polynomial :utils)29 (:use :cl :priority-queue :monom :polynomial :utils) 30 30 (:export "SUGAR-PAIR-KEY" 31 31 "PAIR" … … 50 50 (in-package :pair-queue) 51 51 52 (defun sugar-pair-key (p q &aux (lcm ( monom-lcm (poly-lm p) (poly-lmq)))53 (d ( monom-sugar lcm)))52 (defun sugar-pair-key (p q &aux (lcm (universal-lcm (leading-monomial p) (leading-monomial q))) 53 (d (sugar lcm))) 54 54 "Returns list (S LCM-TOTAL-DEGREE) where S is the sugar of the S-polynomial of 55 55 polynomials P and Q, and LCM-TOTAL-DEGREE is the degree of LCM(LM(P),LM(Q))." 56 56 (declare (type poly p q) (type monom lcm) (type fixnum d)) 57 57 (cons (max 58 (+ (- d ( monom-sugar (poly-lmp))) (poly-sugar p))59 (+ (- d ( monom-sugar (poly-lmq))) (poly-sugar q)))58 (+ (- d (sugar (leading-monomial p))) (poly-sugar p)) 59 (+ (- d (sugar (leading-monomial q))) (poly-sugar q))) 60 60 lcm)) 61 61 … … 133 133 ((minimal-lcm :minimal-lcm $minimal_lcm) 134 134 (setf *pair-key-function* #'(lambda (p q) 135 ( monom-lcm (poly-lm p) (poly-lmq)))135 (universal-lcm (leading-monomial p) (leading-monomial q))) 136 136 *pair-order* #'reverse-monomial-order)) 137 137 ((minimal-total-degree :minimal-total-degree $minimal_total_degree) 138 138 (setf *pair-key-function* #'(lambda (p q) 139 139 (monom-total-degree 140 ( monom-lcm (poly-lm p) (poly-lmq))))140 (universal-lcm (leading-monomial p) (leading-monomial q)))) 141 141 *pair-order* #'<)) 142 142 ((minimal-length :minimal-length $minimal_length)
Note:
See TracChangeset
for help on using the changeset viewer.