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 3436


Ignore:
Timestamp:
2015-08-27T18:21:15-07:00 (9 years ago)
Author:
Marek Rychlik
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/f4grobner/term.lisp

    r3316 r3436  
    5050        self
    5151      (format stream "EXPONENTS=~A COEFF=~A"
    52               dimension exponents coeff))))
     52              exponents coeff))))
    5353
    5454
     
    9393  (multiply-by (copy-instance term1) (copy-instance term2)))
    9494
     95(defmethod r* ((term1 number) (term2 monom))
     96  "Non-destructively multiply TERM1 by TERM2."
     97  (r* term1 (change-class (copy-instance term2) 'term)))
     98
     99(defmethod r* ((term1 number) (term2 term))
     100  "Non-destructively multiply TERM1 by TERM2."
     101  (setf (scalar-coeff term2)
     102        (r* term1 (scalar-coeff term2)))
     103  term2)
     104
    95105(defmethod r-zerop ((self term))
    96106  (r-zerop (scalar-coeff self)))
Note: See TracChangeset for help on using the changeset viewer.