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 64


Ignore:
Timestamp:
2015-06-05T11:26:24-07:00 (9 years ago)
Author:
Marek Rychlik
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/f4grobner/division.lisp

    r59 r64  
    137137             (j (1+ i) (1- (length g))))))
    138138
     139
     140(defun poly-normalize (ring p &aux (c (poly-lc p)))
     141  "Divide a polynomial by its leading coefficient. It assumes
     142that the division is possible, which may not always be the
     143case in rings which are not fields. The exact division operator
     144is assumed to be provided by the RING structure of the
     145COEFFICIENT-RING package."
     146  (mapc #'(lambda (term)
     147            (setf (term-coeff term) (funcall (ring-div ring) (term-coeff term) c)))
     148        (poly-termlist p))
     149  p)
     150
     151(defun poly-normalize-list (ring plist)
     152  "Divide every polynomial in a list PLIST by its leading coefficient. "
     153  (mapcar #'(lambda (x) (poly-normalize ring x)) plist))
Note: See TracChangeset for help on using the changeset viewer.