- Timestamp:
- 2015-06-05T15:35:37-07:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/f4grobner/ngrobner.lisp
r220 r221 282 282 283 283 284 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 285 ;; 286 ;; Macro facility for writing Maxima-level wrappers for 287 ;; functions operating on internal representation 288 ;; 289 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 290 291 (defmacro with-parsed-polynomials (((maxima-vars &optional (maxima-new-vars nil new-vars-supplied-p)) 292 &key (polynomials nil) 293 (poly-lists nil) 294 (poly-list-lists nil) 295 (value-type nil)) 296 &body body 297 &aux (vars (gensym)) 298 (new-vars (gensym))) 299 `(let ((,vars (coerce-maxima-list ,maxima-vars)) 300 ,@(when new-vars-supplied-p 301 (list `(,new-vars (coerce-maxima-list ,maxima-new-vars))))) 302 (coerce-to-maxima 303 ,value-type 304 (with-coefficient-ring ($poly_coefficient_ring) 305 (with-monomial-order ($poly_monomial_order) 306 (with-elimination-orders ($poly_primary_elimination_order 307 $poly_secondary_elimination_order 308 $poly_elimination_order) 309 (let ,(let ((args nil)) 310 (dolist (p polynomials args) 311 (setf args (cons `(,p (parse-poly ,p ,vars)) args))) 312 (dolist (p poly-lists args) 313 (setf args (cons `(,p (parse-poly-list ,p ,vars)) args))) 314 (dolist (p poly-list-lists args) 315 (setf args (cons `(,p (parse-poly-list-list ,p ,vars)) args)))) 316 . ,body)))) 317 ,(if new-vars-supplied-p 318 `(append ,vars ,new-vars) 319 vars)))) 320 321 284 285
Note:
See TracChangeset
for help on using the changeset viewer.