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 3483 for branches


Ignore:
Timestamp:
2015-09-05T10:21:17-07:00 (9 years ago)
Author:
Marek Rychlik
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/f4grobner/monom.lisp

    r3482 r3483  
    340340order, otherwise NIL.  The second returned value is T if P=Q,
    341341otherwise it is NIL.")
    342   (:method ((p monom) (q monom) &optional (start 0) (end (r-dimension  p)))
     342  (:method ((p monom) (q monom) &optional (start 0) (end (monom-dimension  p)))
    343343    (declare (type fixnum start end))
    344344    (do ((i start (1+ i)))
    345345        ((>= i end) (values nil t))
    346346      (cond
    347         ((> (r-elt p i) (r-elt q i))
     347        ((> (monom-elt p i) (monom-elt q i))
    348348         (return-from lex> (values t nil)))
    349         ((< (r-elt p i) (r-elt q i))
     349        ((< (monom-elt p i) (monom-elt q i))
    350350         (return-from lex> (values nil nil)))))))
    351351
     
    355355lexicographic order, otherwise NIL.  The second returned value is T if
    356356P=Q, otherwise it is NIL.")
    357   (:method ((p monom) (q monom) &optional (start 0) (end (r-dimension  p)))
     357  (:method ((p monom) (q monom) &optional (start 0) (end (monom-dimension  p)))
    358358    (declare (type monom p q) (type fixnum start end))
    359     (let ((d1 (r-total-degree p start end))
    360           (d2 (r-total-degree q start end)))
     359    (let ((d1 (monom-total-degree p start end))
     360          (d2 (monom-total-degree q start end)))
    361361      (declare (type fixnum d1 d2))
    362362      (cond
     
    373373because some sets do not have a minimal element. This order is useful
    374374in constructing other orders.")
    375   (:method ((p monom) (q monom) &optional (start 0) (end (r-dimension  p)))
     375  (:method ((p monom) (q monom) &optional (start 0) (end (monom-dimension  p)))
    376376    (declare (type fixnum start end))
    377377    (do ((i (1- end) (1- i)))
     
    379379      (declare (type fixnum i))
    380380      (cond
    381         ((< (r-elt p i) (r-elt q i))
     381        ((< (monom-elt p i) (monom-elt q i))
    382382         (return-from revlex> (values t nil)))
    383         ((> (r-elt p i) (r-elt q i))
     383        ((> (monom-elt p i) (monom-elt q i))
    384384         (return-from revlex> (values nil nil)))))))
    385385
     
    390390lexicographic order, NIL otherwise. The second returned value is T if
    391391P=Q, otherwise it is NIL.")
    392   (:method  ((p monom) (q monom) &optional (start 0) (end (r-dimension  p)))
     392  (:method  ((p monom) (q monom) &optional (start 0) (end (monom-dimension  p)))
    393393    (declare (type fixnum start end))
    394     (let ((d1 (r-total-degree p start end))
    395           (d2 (r-total-degree q start end)))
     394    (let ((d1 (monom-total-degree p start end))
     395          (d2 (monom-total-degree q start end)))
    396396      (declare (type fixnum d1 d2))
    397397      (cond
     
    405405lexicographic order, NIL otherwise The second returned value is T if
    406406P=Q, otherwise it is NIL.")
    407   (:method ((p monom) (q monom) &optional (start 0) (end (r-dimension  p)))
     407  (:method ((p monom) (q monom) &optional (start 0) (end (monom-dimension  p)))
    408408    (declare  (type fixnum start end))
    409409    (do ((i (1- end) (1- i)))
     
    411411      (declare (type fixnum i))
    412412      (cond
    413         ((> (r-elt p i) (r-elt q i))
     413        ((> (monom-elt p i) (monom-elt q i))
    414414         (return-from invlex> (values t nil)))
    415         ((< (r-elt p i) (r-elt q i))
     415        ((< (monom-elt p i) (monom-elt q i))
    416416         (return-from invlex> (values nil nil)))))))
    417417
    418418(defun reverse-monomial-order (order)
    419419  "Create the inverse monomial order to the given monomial order ORDER."
    420   #'(lambda (p q &optional (start 0) (end (r-dimension q)))
     420  #'(lambda (p q &optional (start 0) (end (monom-dimension q)))
    421421      (declare (type monom p q) (type fixnum start end))
    422422      (funcall order q p start end)))
     
    430430;; This returns a closure with the same signature
    431431;; as all orders such as #'LEX>.
    432 (defun make-elimination-order-factory-1 (&optional (secondary-elimination-order #'lex>))
     432(defun make-elimination-ordemonom-factory-1 (&optional (secondary-elimination-order #'lex>))
    433433  "It constructs an elimination order used for the 1-st elimination ideal,
    434434i.e. for eliminating the first variable. Thus, the order compares the degrees of the
    435435first variable in P and Q first, with ties broken by SECONDARY-ELIMINATION-ORDER."
    436   #'(lambda (p q &optional (start 0) (end (r-dimension p)))
     436  #'(lambda (p q &optional (start 0) (end (monom-dimension p)))
    437437      (declare (type monom p q) (type fixnum start end))
    438438      (cond
    439         ((> (r-elt p start) (r-elt q start))
     439        ((> (monom-elt p start) (monom-elt q start))
    440440         (values t nil))
    441         ((< (r-elt p start) (r-elt q start))
     441        ((< (monom-elt p start) (monom-elt q start))
    442442         (values nil nil))
    443443        (t
     
    447447;; The result is *another closure* with the same signature as all
    448448;; orders such as #'LEX>.
    449 (defun make-elimination-order-factory (&optional
     449(defun make-elimination-ordemonom-factory (&optional
    450450                                         (primary-elimination-order #'lex>)
    451451                                         (secondary-elimination-order #'lex>))
     
    467467         (error "K must be at least 1"))
    468468        ((= k 1)
    469          (make-elimination-order-factory-1 secondary-elimination-order))
     469         (make-elimination-ordemonom-factory-1 secondary-elimination-order))
    470470        (t
    471          #'(lambda (p q &optional (start 0) (end (r-dimension  p)))
     471         #'(lambda (p q &optional (start 0) (end (monom-dimension  p)))
    472472             (declare (type monom p q) (type fixnum start end))
    473473             (multiple-value-bind (primary equal)
Note: See TracChangeset for help on using the changeset viewer.