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 3543


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

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/f4grobner/monom.lisp

    r3542 r3543  
    206206      copy))
    207207
    208 (defmethod monom-multiply-2 ((m1 monom) (m2 monom))
    209   "Non-destructively multiply monomial M1 by M2."
    210   (monom-multiply-by (copy-instance m1) (copy-instance m2)))
    211 
    212 (defmethod monom-multiply ((numerator monom) &rest denominators)
    213   "Non-destructively divide monomial NUMERATOR by product of DENOMINATORS."
    214   (monom-divide-by (copy-instance numerator) (reduce #'monom-multiply-2 denominators)))
     208(defgeneric universal-multiply-2 (object1 object2)
     209  (:documentation "Multiply OBJECT1 by OBJECT2")
     210  (:method  (object1 object2)
     211    (universal-multiply-by (copy-instance m1) (copy-instance m2))))
     212
     213(defgeneric universal-divide (numerator &rest denominators)
     214  (:documentation "Non-destructively divide object NUMERATOR by product of DENOMINATORS.")
     215  (:method ((numerator monom) &rest denominators)
     216    (monom-divide-by (copy-instance numerator) (reduce #'universal-multiply-2 denominators))))
    215217
    216218(defmethod monom-divides-p ((m1 monom) (m2 monom))
Note: See TracChangeset for help on using the changeset viewer.