Changeset 1644
- Timestamp:
- 2015-06-14T20:22:14-07:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/f4grobner/mx-grobner.lisp
r1643 r1644 125 125 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 126 126 127 (defun find-ring (ring) 128 "This function returns the ring structure bases on input symbol." 129 (cond 130 ((null ring) nil) 131 ((symbolp ring) 132 (case ring 133 ((maxima-ring :maxima-ring $expression_ring) *maxima-ring*) 134 ((ring-of-integers :ring-of-integers $ring_of_integers) *ring-of-integers*) 135 (otherwise 136 (mtell "~%Warning: Ring ~M not found. Using default.~%" ring)))) 137 (t 138 (mtell "~%Ring specification ~M is not recognized. Using default.~%" ring) 139 nil))) 140 127 141 (defun find-order (order) 128 142 "This function returns the order function bases on its name." … … 142 156 nil))) 143 157 144 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 145 ;; 146 ;; Ring utilities 147 ;; 148 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 149 150 (defun find-ring (ring) 151 "This function returns the ring structure bases on input symbol." 152 (cond 153 ((null ring) nil) 154 ((symbolp ring) 155 (case ring 156 ((maxima-ring :maxima-ring $expression_ring) *maxima-ring*) 157 ((ring-of-integers :ring-of-integers $ring_of_integers) *ring-of-integers*) 158 (otherwise 159 (mtell "~%Warning: Ring ~M not found. Using default.~%" ring)))) 160 (t 161 (mtell "~%Ring specification ~M is not recognized. Using default.~%" ring) 162 nil))) 163 164 165 (defun maxima->poly (expr vars &aux (vars (coerce-maxima-list vars))) 158 159 (defun maxima->poly (expr vars 160 &optional 161 (ring $poly_coefficient_ring) 162 (order $poly_monomial_order) 163 &aux 164 (vars (coerce-maxima-list vars)) 165 (ring-and-order (make-ring-and-order (find-ring) (find-order)))) 166 166 "Convert a maxima polynomial expression EXPR in variables VARS to internal form." 167 167 (labels ((parse (arg) (maxima->poly arg vars))
Note:
See TracChangeset
for help on using the changeset viewer.