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


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

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/f4grobner/monom.lisp

    r3441 r3442  
    2121
    2222(defpackage "MONOM"
    23   (:use :cl :ring)
     23  (:use :cl)
    2424  (:export "MONOM"
    2525           "EXPONENT"
    2626           "MONOM-DIMENSION"
    2727           "MONOM-EXPONENTS"
    28            "MAKE-MONOM-VARIABLE")
     28           "MONOM-EQUALP"
     29           "MONOM-ELT"
     30           "MONOM-TOTAL-DEGREE"
     31           "MONOM-SUGRAR"
     32           "MONOM-MULTIPLY-BY"
     33           "MONOM-DIVIDE-BY"
     34           "MONOM-COPY-INSTANCE"
     35           "MONOM-MULTIPLY-2"
     36           "MONOM-MULTIPLY"
     37           "MONOM-DIVIDES-P"
     38           "MONOM-DIVIDES-LCM-P"
     39           "MONOM-LCM-DIVIDES-LCM-P"
     40           "MONOM-LCM-EQUAL-LCM-P"
     41           "MONOM-DIVISIBLE-BY-P"
     42           "MONOM-REL-PRIME-P"
     43           "MONOM-LCM"
     44           "MONOM-GCD"
     45           "MONOM-DEPENDS-P"
     46           "MONOM-LEFT-TENSOR-PRODUCT-BY"
     47           "MONOM-RIGHT-TENSOR-PRODUCT-BY"
     48           "MONOM-LEFT-CONTRACT"
     49           "MAKE-MONOM-VARIABLE"
     50           "MONOM->LIST")
     51
    2952  (:documentation
    3053   "This package implements basic operations on monomials.
     
    137160  (monom-total-degree m start end))
    138161
    139 (defmethod multiply-by ((self monom) (other monom))
     162(defmethod monom-multiply-by ((self monom) (other monom))
    140163  (with-slots ((exponents1 exponents))
    141164      self
     
    159182  self)
    160183
    161 (defmethod copy-instance :around ((object monom)  &rest initargs &key &allow-other-keys)
     184(defmethod monom-copy-instance ((object monom)  &rest initargs &key &allow-other-keys)
    162185  "An :AROUNT method for COPY-INSTANCE. The primary method is a shallow copy,
    163186  while for monomials we typically need a fresh copy of the
     
    168191    copy))
    169192
    170 (defmethod monom* ((m1 monom) (m2 monom))
     193(defmethod monom-multiply-2 ((m1 monom) (m2 monom))
    171194  "Non-destructively multiply monomial M1 by M2."
    172195  (multiply-by (copy-instance m1) (copy-instance m2)))
    173196
    174 (defmethod monom* ((numerator monom) &rest denominators)
     197(defmethod monom-multiply ((numerator monom) &rest denominators)
    175198  "Non-destructively divide monomial NUMERATOR by product of DENOMINATORS."
    176   (divide-by (copy-instance numerator) (reduce #'
    177                                         monom* denominators)))
     199  (divide-by (copy-instance numerator) (reduce #'monom-multiply-2 denominators)))
    178200
    179201(defmethod monom-divides-p ((m1 monom) (m2 monom))
Note: See TracChangeset for help on using the changeset viewer.