Changeset 4353
- Timestamp:
- 2016-06-06T17:37:11-07:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/f4grobner/monom.lisp
r4345 r4353 33 33 "MULTIPLY-BY" 34 34 "DIVIDE-BY" 35 "DIVIDE"36 "MULTIPLY"37 35 "DIVIDES-P" 38 36 "DIVIDES-LCM-P" … … 189 187 self) 190 188 191 (defun multiply (factor &rest more-factors)192 "Successively multiplies factor FACTOR by the remaining arguments193 MORE-FACTORS, using MULTIPLY-BY to multiply two factors. Thus194 FACTOR may be destructively modified."195 (reduce #'multiply-by more-factors :initial-value (copy-instance factor)))196 197 189 (defmethod divide-by ((self monom) (other monom)) 198 190 (with-slots ((exponents1 exponents)) … … 221 213 222 214 (defmethod unary-inverse ((self monom)) self) 223 224 (defun divide (numerator &rest denominators)225 "Successively divides NUMERATOR by elements of DENOMINATORS. The operation226 destructively modifies NUMERATOR."227 (cond ((endp denominators)228 (unary-inverse numerator))229 (t (reduce #'divide-by denominators :initial-value (copy-instance numerator)))))230 215 231 216 (defgeneric divides-p (object1 object2)
Note:
See TracChangeset
for help on using the changeset viewer.