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 1974


Ignore:
Timestamp:
2015-06-15T21:41:27-07:00 (9 years ago)
Author:
Marek Rychlik
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/f4grobner/pol.lisp

    r1973 r1974  
    8484(proclaim '(optimize (speed 0) (space 0) (safety 3) (debug 3)))
    8585
    86 (defstruct (poly
    87              ;;
    88              ;; BOA constructor, by default constructs zero polynomial
    89              (:constructor make-poly-from-termlist (termlist &optional (sugar (termlist-sugar termlist))))
    90              (:constructor make-poly-zero (&aux (termlist nil) (sugar -1)))
    91              ;; Constructor of polynomials representing a variable
    92              (:constructor make-poly-variable (ring nvars pos &optional (power 1)
    93                                                &aux
    94                                                (termlist (list
    95                                                           (make-term-variable ring nvars pos power)))
    96                                                (sugar power)))
    97              (:constructor poly-unit (ring dimension
    98                                            &aux
    99                                            (termlist (termlist-unit ring dimension))
    100                                            (sugar 0))))
    101   (termlist nil :type list)
    102   (sugar -1 :type fixnum))
     86(defclass (poly)
     87    ((termlist)
     88     (sugar)))
     89
     90(defun make-poly-from-termlist (termlist &optional (sugar (termlist-sugar termlist))))
     91(defun make-poly-zero (&aux (termlist nil) (sugar -1)))
     92(defun make-poly-variable (ring nvars pos &optional (power 1)
     93                           &aux
     94                             (termlist (list
     95                                        (make-term-variable ring nvars pos power)))
     96                             (sugar power)))
     97
     98(defun poly-unit (ring dimension
     99                  &aux
     100                    (termlist (termlist-unit ring dimension))
     101                    (sugar 0)))
     102
     103
    103104
    104105;; Leading term
Note: See TracChangeset for help on using the changeset viewer.