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


Ignore:
Timestamp:
2015-06-19T07:57:13-07:00 (9 years ago)
Author:
Marek Rychlik
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/f4grobner/order.lisp

    r1938 r2425  
    2828
    2929(defpackage "ORDER"
    30   (:use :cl :monom)
     30  (:use :cl :ring :monom)
    3131  (:export "LEX>"
    3232           "GRLEX>"
     
    4242
    4343;; pure lexicographic
    44 (defun lex> (p q &optional (start 0) (end (monom-dimension  p)))
     44(defmethod lex> ((p monom) (q monom) &optional (start 0) (end (monom-dimension  p)))
    4545  "Return T if P>Q with respect to lexicographic order, otherwise NIL.
    4646The second returned value is T if P=Q, otherwise it is NIL."
     
    4949      ((>= i end) (values nil t))
    5050    (cond
    51      ((> (monom-elt p i) (monom-elt q i))
     51     ((> (r-elt p i) (r-elt q i))
    5252      (return-from lex> (values t nil)))
    53      ((< (monom-elt p i) (monom-elt q i))
     53     ((< (r-elt p i) (r-elt q i))
    5454      (return-from lex> (values nil nil))))))
    5555
     
    8181    (declare (type fixnum i))
    8282    (cond
    83      ((< (monom-elt p i) (monom-elt q i))
     83     ((< (r-elt p i) (r-elt q i))
    8484      (return-from revlex> (values t nil)))
    85      ((> (monom-elt p i) (monom-elt q i))
     85     ((> (r-elt p i) (r-elt q i))
    8686      (return-from revlex> (values nil nil))))))
    8787
     
    109109    (declare (type fixnum i))
    110110    (cond
    111       ((> (monom-elt p i) (monom-elt q i))
     111      ((> (r-elt p i) (r-elt q i))
    112112       (return-from invlex> (values t nil)))
    113       ((< (monom-elt p i) (monom-elt q i))
     113      ((< (r-elt p i) (r-elt q i))
    114114       (return-from invlex> (values nil nil))))))
    115115
     
    136136      (declare (type monom p q) (type fixnum start end))
    137137      (cond
    138         ((> (monom-elt p start) (monom-elt q start))
     138        ((> (r-elt p start) (r-elt q start))
    139139         (values t nil))
    140         ((< (monom-elt p start) (monom-elt q start))
     140        ((< (r-elt p start) (r-elt q start))
    141141         (values nil nil))
    142142        (t
Note: See TracChangeset for help on using the changeset viewer.