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 4093


Ignore:
Timestamp:
2016-06-01T10:24:47-07:00 (9 years ago)
Author:
Marek Rychlik
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/f4grobner/monom.lisp

    r4091 r4093  
    3434           "DIVIDE-BY"
    3535           "DIVIDE"
    36            "MULTIPLY-2"
    3736           "MULTIPLY"
    3837           "DIVIDES-P"
     
    197196    self))
    198197
     198(defun multiply (factor &rest more-factors)
     199  "Successively multiplies factor FACTOR by the remaining arguments
     200MORE-FACTORS."
     201  (reduce #'multiply-by more-factors :initial-value factor))
     202
    199203(defgeneric divide-by (self other)
    200204  (:documentation "Divide SELF by OTHER, return SELF.")
     
    220224      copy))
    221225
    222 (defun multiply-2 (object1 object2)
    223   "Multiply OBJECT1 by OBJECT2"
    224   (multiply-by (copy-instance object1) (copy-instance object2)))
    225 
    226 (defun multiply (&rest factors)
    227   "Non-destructively multiply list FACTORS."
    228   (cond ((endp factors) 1)
    229         ((endp (rest factors)) (first factors))
    230         (t (reduce #'multiply-2 factors))))
     226;; (defun multiply-2 (object1 object2)
     227;;   "Multiply OBJECT1 by OBJECT2"
     228;;   (multiply-by (copy-instance object1) (copy-instance object2)))
     229
     230;; (defun multiply (&rest factors)
     231;;   "Non-destructively multiply list FACTORS."
     232;;   (cond ((endp factors) 1)
     233;;      ((endp (rest factors)) (first factors))
     234;;      (t (reduce #'multiply-2 factors))))
    231235
    232236(defgeneric unary-inverse (self)
     
    590594  (setf (term-coeff self) (multiply-by (term-coeff self) (term-coeff other))))
    591595
     596
    592597(defmethod left-tensor-product-by :before ((self term) (other term))
    593598  (setf (term-coeff self) (multiply-by (term-coeff self) (term-coeff other))))
Note: See TracChangeset for help on using the changeset viewer.