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


Ignore:
Timestamp:
2015-06-22T20:41:50-07:00 (10 years ago)
Author:
Marek Rychlik
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/f4grobner/polynomial.lisp

    r3253 r3254  
    8989
    9090(defmethod insert-item ((self poly) (item term))
    91   (assert (= (monom-dimension item) (poly-dimension self)))
     91  (cond ((null (poly-dimension self))
     92         (setf (poly-dimension self) (monom-dimension other)))
     93        (t (assert (= (monom-dimension item) (poly-dimension self)))))
    9294  (push item (poly-termlist self))
    9395  self)
    9496
    9597(defmethod append-item ((self poly) (item term))
    96   (assert (= (monom-dimension item) (poly-dimension self)))
     98  (cond ((null (poly-dimension self))
     99         (setf (poly-dimension self) (monom-dimension other)))
     100        (t (assert (= (monom-dimension item) (poly-dimension self)))))
    97101  (setf (cdr (last (poly-termlist self))) (list item))
    98102  self)
Note: See TracChangeset for help on using the changeset viewer.