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 2449 for branches/f4grobner


Ignore:
Timestamp:
2015-06-19T10:16:51-07:00 (9 years ago)
Author:
Marek Rychlik
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/f4grobner/polynomial.lisp

    r2448 r2449  
    150150(defmethod unary-uminus (self))
    151151
    152 (defun poly-append (&rest plist)
    153   (make-poly-from-termlist (apply #'append (mapcar #'poly-termlist plist))
    154                            (apply #'max (mapcar #'poly-sugar plist))))
    155 
    156 (defun poly-nreverse (p)
    157   "Destructively reverse the order of terms in polynomial P. Returns P"
    158   (declare (type poly p))
    159   (setf (poly-termlist p) (nreverse (poly-termlist p)))
    160   p)
    161 
    162 (defun poly-reverse (p)
    163   "Returns a copy of the polynomial P with terms in reverse order."
    164   (declare (type poly p))
    165   (make-poly-from-termlist (reverse (poly-termlist p))
    166                            (poly-sugar p)))
    167 
    168 
    169 (defun poly-contract (p &optional (k 1))
    170   (declare (type poly p))
    171   (make-poly-from-termlist (termlist-contract (poly-termlist p) k)
    172                            (poly-sugar p)))
    173 
    174 (defun poly-extend (p &optional (m (make-monom :dimension 1)))
    175   (declare (type poly p))
    176   (make-poly-from-termlist
    177    (termlist-extend (poly-termlist p) m)
    178    (+ (poly-sugar p) (monom-sugar m))))
    179 
    180 (defun poly-add-variables (p k)
    181   (declare (type poly p))
    182   (setf (poly-termlist p) (termlist-add-variables (poly-termlist p) k))
    183   p)
    184 
    185 (defun poly-list-add-variables (plist k)
    186   (mapcar #'(lambda (p) (poly-add-variables p k)) plist))
    187 
    188152(defun poly-standard-extension (plist &aux (k (length plist)))
    189153  "Calculate [U1*P1,U2*P2,...,UK*PK], where PLIST=[P1,P2,...,PK]."
Note: See TracChangeset for help on using the changeset viewer.