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


Ignore:
Timestamp:
2015-06-17T15:57:29-07:00 (9 years ago)
Author:
Marek Rychlik
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/f4grobner/monom.lisp

    r2032 r2034  
    146146  (monom-total-degree m start end))
    147147
    148 (defun monom-div (m1 m2 &aux (result (copy-seq m1)))
     148(defmethod ring-div ((m1 monom) (m2 monom))
    149149  "Divide monomial M1 by monomial M2."
    150   (declare (type monom m1 m2 result))
    151   (map-into result #'- m1 m2))
    152 
     150  (with-slots (exponents1 exponents)
     151      m1
     152    (with-slots (exponents2 exponents2)
     153        m2
     154      (let* ((exponents (copy-seq exponents1))
     155             (dim (reduce #+ exponents)))
     156        (map-into result #'- exponents1 exponents2)
     157        (make-instance 'monom :dim dim :exponents exponents)))))
     158
     159#|
    153160(defun monom-mul (m1 m2  &aux (result (copy-seq m1)))
    154161  "Multiply monomial M1 by monomial M2."
Note: See TracChangeset for help on using the changeset viewer.