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


Ignore:
Timestamp:
2015-06-21T17:34:40-07:00 (10 years ago)
Author:
Marek Rychlik
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/f4grobner/polynomial.lisp

    r3050 r3055  
    2121
    2222(defpackage "POLYNOMIAL"
    23   (:use :cl :ring :monom :order :term #| :infix |# )
     23  (:use :cl :utils :ring :monom :order :term #| :infix |# )
    2424  (:export "POLY"
    2525           "POLY-TERMLIST"
     
    276276  "Calculate [U1*P1,U2*P2,...,UK*PK], where PLIST=[P1,P2,...,PK]
    277277is a list of polynomials."
    278   (declare (list plist) (fixnum k))
    279   (labels ((incf-power (g i)
    280              (dolist (x (poly-termlist g))
    281                (incf (monom-elt (term-monom x) i)))
    282              (incf (poly-sugar g))))
    283     (setf plist (poly-list-add-variables plist k))
    284     (dotimes (i k plist)
    285       (incf-power (nth i plist) i))))
     278  (makelist (left-tensor-product-by (nth i plist)
     279                                    (make-term-variable k i))
     280            i 0 k))
    286281
    287282#|
Note: See TracChangeset for help on using the changeset viewer.