- Timestamp:
- 2015-08-27T05:58:46-07:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/f4grobner/symbolic-polynomial.lisp
r3366 r3367 22 22 (defpackage "SYMBOLIC-POLYNOMIAL" 23 23 (:use :cl :utils :ring :monom :order :term :polynomial :infix) 24 (:export "SYMBOLIC-POLY" )24 (:export "SYMBOLIC-POLY" "READ-INFIX-FORM") 25 25 (:documentation "Implements symbolic polynomials. A symbolic 26 26 polynomial is and object which uses symbolic variables for reading and … … 56 56 (assert (= (length (symbolic-poly-vars new)) (poly-dimension new)))) 57 57 58 (defgeneric poly-eval (expr vars ringorder)58 (defgeneric poly-eval (expr vars order) 59 59 (:documentation "Evaluate Lisp form EXPR to a polynomial or a list of polynomials in 60 60 variables VARS. Return the resulting polynomial or list of … … 64 64 of polynomials in internal form. A similar operation in another computer 65 65 algebra system could be called 'expand' or so.") 66 (:method ((expr symbolic-poly) vars ringorder) expr)67 (:method (expr vars ringorder)66 (:method ((expr symbolic-poly) vars order) expr) 67 (:method (expr vars order) 68 68 (cond 69 69 ((eq expr 0) … … 71 71 ((member expr vars :test #'equalp) 72 72 (let ((pos (position expr vars :test #'equalp))) 73 (make- poly-variable ring(length vars) pos)))73 (make-monom-variable (length vars) pos))) 74 74 ((atom expr) 75 (coerce-coeff ring expr vars))75 expr) 76 76 ((eq (car expr) list-marker) 77 77 (cons list-marker (p-eval-list (cdr expr)))) 78 78 (t 79 79 (case (car expr) 80 (+ (reduce #' p-add(p-eval-list (cdr expr))))80 (+ (reduce #'add-to (p-eval-list (cdr expr)))) 81 81 (- (case (length expr) 82 82 (1 (make-poly-zero))
Note:
See TracChangeset
for help on using the changeset viewer.