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 3920


Ignore:
Timestamp:
2016-05-29T21:46:35-07:00 (8 years ago)
Author:
Marek Rychlik
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/f4grobner/pair-queue.lisp

    r3919 r3920  
    2222(defpackage "PAIR-QUEUE"
    2323  (:use :cl :priority-queue :monom :polynomial :utils)
    24   (:export "PAIR"
    25            "MAKE-PAIR"
    26            "PAIR-FIRST"
    27            "PAIR-SECOND"
    28            "PAIR-DIVISION-DATA"
    29            "*PAIR-KEY-FUNCTION*"
    30            "*PAIR-ORDER*"
     24  (:export "CRITICAL-PAIR"
     25           "CRITICAL-PAIR-FIRST"
     26           "CRITICAL-PAIR-SECOND"
    3127           "MAKE-PAIR-QUEUE"
    3228           "PAIR-QUEUE-INITIALIZE"
     
    4541
    4642(defclass critical-pair ()
    47   ((first :initform nil :initarg :first)
    48    (second :initform nil :initarg :second))
     43  ((first :initform nil  :initarg :first :accessor critical-pair-first)
     44   (second :initform nil :initarg :second :accessor critical-pair-second))
    4945  (:documentation "Represents a critical pair."))
    5046
     47(defmethod print-object ((self poly) stream)
     48  (print-unreadable-object (self stream :type t :identity t)
     49    (with-accessors ((first critical-pair-first)
     50                     (second critical-pair-second))
     51        self
     52      (format stream "FIRST=~A SECOND=~A"
     53              first second))))
     54
    5155 
    52 (defvar *pair-key-function* nil
    53   "Function that, given two polynomials as argument, computed the key
    54 in the pair queue.")
    55 
    56 (defvar *pair-order* nil
    57   "Function that orders the keys of pairs.")
    58 
    5956(defun make-pair-queue ()
    6057  "Constructs a priority queue for critical pairs."
Note: See TracChangeset for help on using the changeset viewer.