- Timestamp:
- 2015-06-16T17:28:57-07:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/f4grobner/pol.lisp
r2005 r2006 127 127 (cond 128 128 ((null expr) 129 (error "Empty expression"))130 ((eql expr 0)131 ())129 ;; Do nothing, nil is a representation of 0 130 ;; in all polynomial rings 131 ) 132 132 ((member expr vars :test #'equalp) 133 (let ((pos (position expr vars :test #'equalp))) 134 (make-poly-variable ring (length vars) pos))) 133 (let* ((pos (position expr vars :test #'equalp)) 134 (monom (let ((m (make-list (length vars) :initial-element 0))) 135 (setf (nth m pos) 1) m))) 136 (make-instance 'poly :expr (list (cons monom 1))))) 135 137 ((atom expr) 136 138 (scalar->poly ring expr vars))
Note:
See TracChangeset
for help on using the changeset viewer.