- Timestamp:
- 2015-06-06T19:39:44-07:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/f4grobner/order.lisp
r417 r426 64 64 65 65 66 ;; total degree, ties broken by reverse lexicographic67 (defun grevlex> (p q &optional (start 0) (end (monom-dimension p)))68 "Return T if P>Q with respect to graded reverse lexicographic order,69 NIL otherwise. The second returned value is T if P=Q, otherwise it is NIL."70 (declare (type monom p q) (type fixnum start end))71 (let ((d1 (monom-total-degree p start end))72 (d2 (monom-total-degree q start end)))73 (cond74 ((> d1 d2) (values t nil))75 ((< d1 d2) (values nil nil))76 (t77 (revlex> p q start end)))))78 79 80 66 ;; reverse lexicographic 81 67 (defun revlex> (p q &optional (start 0) (end (monom-dimension p))) … … 96 82 97 83 84 ;; total degree, ties broken by reverse lexicographic 85 (defun grevlex> (p q &optional (start 0) (end (monom-dimension p))) 86 "Return T if P>Q with respect to graded reverse lexicographic order, 87 NIL otherwise. The second returned value is T if P=Q, otherwise it is NIL." 88 (declare (type monom p q) (type fixnum start end)) 89 (let ((d1 (monom-total-degree p start end)) 90 (d2 (monom-total-degree q start end))) 91 (cond 92 ((> d1 d2) (values t nil)) 93 ((< d1 d2) (values nil nil)) 94 (t 95 (revlex> p q start end))))) 96 98 97 (defun invlex> (p q &optional (start 0) (end (monom-dimension p))) 99 98 "Return T if P>Q with respect to inverse lexicographic order, NIL otherwise
Note:
See TracChangeset
for help on using the changeset viewer.