Changeset 2434 for branches/f4grobner
- Timestamp:
- 2015-06-19T08:12:56-07:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/f4grobner/order.lisp
r2433 r2434 72 72 73 73 ;; reverse lexicographic 74 (defgeneric revlex> ((p monom) (q monom) &optional (start 0) (end (r-dimension p))) 75 "Return T if P>Q with respect to reverse lexicographic order, NIL 74 (defgeneric revlex> (p q &optional start end) 75 (:method ((p monom) (q monom) &optional (start 0) (end (r-dimension p))) 76 "Return T if P>Q with respect to reverse lexicographic order, NIL 76 77 otherwise. The second returned value is T if P=Q, otherwise it is 77 78 NIL. This is not and admissible monomial order because some sets do 78 79 not have a minimal element. This order is useful in constructing other 79 80 orders." 80 (declare (type fixnum start end))81 (do ((i (1- end) (1- i)))82 83 (declare (type fixnum i))84 (cond85 86 87 88 (return-from revlex> (values nil nil))))))81 (declare (type fixnum start end)) 82 (do ((i (1- end) (1- i))) 83 ((< i start) (values nil t)) 84 (declare (type fixnum i)) 85 (cond 86 ((< (r-elt p i) (r-elt q i)) 87 (return-from revlex> (values t nil))) 88 ((> (r-elt p i) (r-elt q i)) 89 (return-from revlex> (values nil nil))))))) 89 90 90 91
Note:
See TracChangeset
for help on using the changeset viewer.