Changeset 4093
- Timestamp:
- 2016-06-01T10:24:47-07:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/f4grobner/monom.lisp
r4091 r4093 34 34 "DIVIDE-BY" 35 35 "DIVIDE" 36 "MULTIPLY-2"37 36 "MULTIPLY" 38 37 "DIVIDES-P" … … 197 196 self)) 198 197 198 (defun multiply (factor &rest more-factors) 199 "Successively multiplies factor FACTOR by the remaining arguments 200 MORE-FACTORS." 201 (reduce #'multiply-by more-factors :initial-value factor)) 202 199 203 (defgeneric divide-by (self other) 200 204 (:documentation "Divide SELF by OTHER, return SELF.") … … 220 224 copy)) 221 225 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)))) 231 235 232 236 (defgeneric unary-inverse (self) … … 590 594 (setf (term-coeff self) (multiply-by (term-coeff self) (term-coeff other)))) 591 595 596 592 597 (defmethod left-tensor-product-by :before ((self term) (other term)) 593 598 (setf (term-coeff self) (multiply-by (term-coeff self) (term-coeff other))))
Note:
See TracChangeset
for help on using the changeset viewer.