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 4034 for branches


Ignore:
Timestamp:
2016-05-31T15:55:17-07:00 (8 years ago)
Author:
Marek Rychlik
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/f4grobner/polynomial.lisp

    r4028 r4034  
    202202          (poly-termlist self))
    203203    self))
     204
     205(defmethod unary-inverse :before ((self poly))
     206  (with-slots (termlist)
     207      (assert (and (= (length termlist) 1) (zerop (total-degree (car termlist)) 0))
     208              nil
     209              "To be invertible, the polynomial must have 1 term of total degree 0.")))
     210
     211(defmethod unary-inverse ((self poly))
     212  (with-slots (termlist)
     213      self
     214    (setf (car termlist) (unary-inverse (car termlist)))))
    204215
    205216(defmethod multiply-by ((self poly) (other monom))
Note: See TracChangeset for help on using the changeset viewer.