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 3367


Ignore:
Timestamp:
2015-08-27T05:58:46-07:00 (9 years ago)
Author:
Marek Rychlik
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/f4grobner/symbolic-polynomial.lisp

    r3366 r3367  
    2222(defpackage "SYMBOLIC-POLYNOMIAL"
    2323  (:use :cl :utils :ring :monom :order :term :polynomial :infix)
    24   (:export "SYMBOLIC-POLY")
     24  (:export "SYMBOLIC-POLY" "READ-INFIX-FORM")
    2525  (:documentation "Implements symbolic polynomials. A symbolic
    2626polynomial is and object which uses symbolic variables for reading and
     
    5656  (assert (= (length (symbolic-poly-vars new)) (poly-dimension new))))
    5757
    58 (defgeneric poly-eval (expr vars ring order)
     58(defgeneric poly-eval (expr vars order)
    5959  (:documentation "Evaluate Lisp form EXPR to a polynomial or a list of polynomials in
    6060variables VARS. Return the resulting polynomial or list of
     
    6464of polynomials in internal form. A similar operation in another computer
    6565algebra system could be called 'expand' or so.")
    66   (:method ((expr symbolic-poly) vars ring order) expr)
    67   (:method (expr vars ring order)
     66  (:method ((expr symbolic-poly) vars order) expr)
     67  (:method (expr vars order)
    6868    (cond
    6969      ((eq expr 0)
     
    7171      ((member expr vars :test #'equalp)
    7272       (let ((pos (position expr vars :test #'equalp)))
    73          (make-poly-variable ring (length vars) pos)))
     73         (make-monom-variable (length vars) pos)))
    7474      ((atom expr)
    75        (coerce-coeff ring expr vars))
     75       expr)
    7676      ((eq (car expr) list-marker)
    7777       (cons list-marker (p-eval-list (cdr expr))))
    7878      (t
    7979       (case (car expr)
    80          (+ (reduce #'p-add (p-eval-list (cdr expr))))
     80         (+ (reduce #'add-to (p-eval-list (cdr expr))))
    8181         (- (case (length expr)
    8282              (1 (make-poly-zero))
Note: See TracChangeset for help on using the changeset viewer.