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 2800


Ignore:
Timestamp:
2015-06-20T21:39:05-07:00 (9 years ago)
Author:
Marek Rychlik
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/f4grobner/polynomial.lisp

    r2799 r2800  
    196196  (fast-add/subtract p q order-fn add-to nil))
    197197
    198 (defun multiply-term-by-termlist-dropping-zeros (term termlist)
     198(defmacro multiply-term-by-termlist-dropping-zeros (term termlist
     199                                                    &optional (reverse-order nil))
    199200  "Multiplies term TERM by a list of term, TERMLIST.
    200201Takes into accound divisors of zero in the ring, by
    201202deleting zero terms."
    202   (mapcan #'(lambda (other-term)
    203               (let ((prod (term-multiply term other-term)))
    204                 (cond
    205                   ((r-zerop prod) nil)
    206                   (t (list prod)))))
    207           termlist))
    208 
    209 (defun multiply-termlist-by-term-dropping-zeros (termlist term)
    210   "A product of a termlist TERMLIST by a term TERM>
    211 Takes into accound divisors of zero in the ring, by
    212 deleting zero terms."
    213   (mapcan #'(lambda (other-term)
    214               (let ((prod (term-multiply other-term term)))
    215                 (cond
    216                   ((r-zerop prod) nil)
    217                   (t (list prod)))))
    218           termlist))
     203  `(mapcan #'(lambda (other-term)
     204               (let ((prod (term-multiply ,term other-term)))
     205                 (cond
     206                   ((r-zerop prod) nil)
     207                   (t (list prod)))))
     208           ,termlist))
    219209
    220210(defun multiply-termlists (p q order-fn)
Note: See TracChangeset for help on using the changeset viewer.