Changeset 2805 for branches/f4grobner
- Timestamp:
- 2015-06-20T21:57:44-07:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/f4grobner/term.lisp
r2730 r2805 105 105 |# 106 106 107 (defmethod r* :around ((term1 term) (term2 term)) 108 "Returns the product of the terms TERM1 and TERM2, 109 or NIL when the product is 0. This definition takes care of divisors of 0 110 in the coefficient ring." 111 (let ((result (change-class (call-next-method) 'term))) 112 (setf (r-coeff result) (r* (r-coeff term1) (r-coeff term2))) 113 result)) 114 115 (defmethod multiply-by ((self term) (other monom)) 116 "Returns the product of the terms TERM1 and TERM2, 117 or NIL when the product is 0. This definition takes care of divisors of 0 118 in the coefficient ring." 107 (defmethod multiply-by ((self term) (other term)) 108 "Multiply terms SELF and OTHER and store the result into SELF. 109 It returns SELF." 119 110 (setf (r-coeff self) (multiply-by (r-coeff self) (r-coeff other))) 120 self)121 122 (defmethod multiply-by ((self term) (other scalar))123 "Returns the product of the terms TERM1 and TERM2,124 or NIL when the product is 0. This definition takes care of divisors of 0125 in the coefficient ring."126 (setf (r-coeff self) (multiply-by (r-coeff self) other))127 111 self) 128 112
Note:
See TracChangeset
for help on using the changeset viewer.