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 4170 for branches/f4grobner


Ignore:
Timestamp:
2016-06-03T02:03:26-07:00 (9 years ago)
Author:
Marek Rychlik
Message:

Moved files infix-errors* to junk

Location:
branches/f4grobner
Files:
1 added
2 edited
2 moved

Legend:

Unmodified
Added
Removed
  • branches/f4grobner/buchberger.lisp

    r4132 r4170  
    7575                nil)
    7676               (t
    77                 (setf sp (poly-primitive-part ring sp)
     77                (setf sp (poly-primitive-part sp)
    7878                      f (nconc f (list sp)))
    7979                ;; Add new critical pairs
     
    8686              t)))))
    8787
    88 (defun parallel-buchberger (ring-and-order f
     88(defun parallel-buchberger (f
    8989                            &optional
    9090                              (start 0)
    91                               (top-reduction-only $poly_top_reduction_only)
    92                             &aux
    93                               (ring (ro-ring ring-and-order)))
     91                              (top-reduction-only $poly_top_reduction_only))
    9492  "An implementation of the Buchberger algorithm. Return Grobner basis
    9593of the ideal generated by the polynomial list F.  Polynomials 0 to
     
    9795critical pairs will not be examined. If TOP-REDUCTION-ONLY set, top
    9896reduction will be preformed."
    99   (declare (type ring-and-order ring-and-order)
    100            (ignore top-reduction-only)
     97  (declare (ignore top-reduction-only)
    10198           (type fixnum start))
    10299  (when (endp f) (return-from parallel-buchberger f)) ;cut startup costs
     
    104101  (when (plusp start) (debug-cgb "~&INCREMENTAL:~d done" start))
    105102  #+grobner-check  (when (plusp start)
    106                      (grobner-test ring-and-order (subseq f 0 start) (subseq f 0 start)))
     103                     (grobner-test (subseq f 0 start) (subseq f 0 start)))
    107104  ;;Initialize critical pairs
    108105  (let ((b (pair-queue-initialize (make-pair-queue) f start))
     
    116113    (do ()
    117114        ((pair-queue-empty-p b)
    118          #+grobner-check(grobner-test ring-and-order f f)
     115         #+grobner-check(grobner-test f f)
    119116         (debug-cgb "~&GROBNER END")
    120117         f)
    121118      (let ((pair (pair-queue-remove b)))
    122119        (when (null (pair-division-data pair))
    123           (setf (pair-division-data pair) (list (spoly ring-and-order
     120          (setf (pair-division-data pair) (list (s-polynomial
    124121                                                       (pair-first pair)
    125122                                                       (pair-second pair))
  • branches/f4grobner/pair-queue.lisp

    r4162 r4170  
    125125                   (i start (1- s)) (j (1+ i) s))))
    126126
    127 (defgeneric enqueue-critical-pairs (self pair-lst)
     127(defgeneric enqueue-critical-pairs (self pair-lst)
     128  (:documentation "Place pairs in PAIR-LST on the queue SELF.")
    128129  (:method ((self critical-pair-queue) pair-lst)
     130    "Enqueue into queue QUEUE the elements of the list PAIR-LST."
    129131    (dolist (pair pair-lst self)
    130132      (enqueue self pair))))
    131 
    132133
    133134(defgeneric make-critical-pair-queue (object &optional poly-lst start)
     
    136137    (with-slots (pair-key-fn pair-order-fn)
    137138        object
    138       (make-instance 'critical-pair-queue
    139                      :element-key #'(lambda (pair)
    140                                       (funcall pair-key-fn
    141                                                (critical-pair-first pair)
    142                                                (critical-pair-second pair)))
    143                      :test pair-order-fn))))
     139      (let ((queue (make-instance 'critical-pair-queue
     140                                  :element-key #'(lambda (pair)
     141                                                   (funcall pair-key-fn
     142                                                            (critical-pair-first pair)
     143                                                            (critical-pair-second pair)))
     144                                  :test pair-order-fn)))
     145           (enqueue-critical-pairs queue (make-critical-pairs poly-lst start))))))
    144146
Note: See TracChangeset for help on using the changeset viewer.