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


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

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/f4grobner/polynomial.lisp

    r4034 r4035  
    204204
    205205(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))
     206  "Checks invertibility of a polynomial SELF. To be invertable, the
     207polynomial must be an invertible, constant polynomial."
    212208  (with-slots (termlist)
    213209      self
    214     (setf (car termlist) (unary-inverse (car termlist)))))
     210    (assert (and (= (length termlist) 1) (zerop (total-degree (car termlist))))
     211            nil
     212            "To be invertible, the polynomial must have 1 term of total degree 0.")))
     213
     214(defmethod unary-inverse ((self poly))
     215  "Returns the unary inverse of a polynomial SELF."
     216  (with-slots (termlist)
     217      self
     218    (setf (car termlist) (unary-inverse (car termlist)))
     219    self))
    215220
    216221(defmethod multiply-by ((self poly) (other monom))
Note: See TracChangeset for help on using the changeset viewer.