Changeset 2099
- Timestamp:
- 2015-06-17T20:00:49-07:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/f4grobner/ring.lisp
r2098 r2099 49 49 (in-package :ring) 50 50 51 (defgeneric parse (object) 52 (:method ((object t)) object)) 53 54 (defgeneric unit-for (object) 51 (defgeneric ring-unit-for (object) 55 52 (:method ((self number)) 1)) 56 53 57 (defgeneric zerop (object)54 (defgeneric ring-zerop (object) 58 55 (:method ((self number)) (zerop self))) 59 56 60 (defgeneric add (x y)57 (defgeneric ring-add (x y) 61 58 (:method ((x number) (y number)) (+ x y))) 62 59 63 (defgeneric mul (x y)60 (defgeneric ring-mul (x y) 64 61 (:method ((x number) (y number)) (* x y))) 65 62 66 (defgeneric tensor-mul (x y))63 (defgeneric ring-tensor-mul (x y)) 67 64 68 (defgeneric div (x y)65 (defgeneric ring-div (x y) 69 66 (:method ((x number) (y number)) (/ x y))) 70 67 71 (defgeneric lcm (x y)68 (defgeneric ring-lcm (x y) 72 69 (:method ((x integer) (y integer)) (lcm x y))) 73 70 74 (defgeneric ezgcd (x y)71 (defgeneric ring-ezgcd (x y) 75 72 (:method ((x integer) (y integer) 76 73 &aux (c (gcd x y))) 77 74 (values c (/ x c) (/ y c)))) 78 75 79 (defgeneric gcd (x y)76 (defgeneric ring-gcd (x y) 80 77 (:method ((x integer) (y integer)) 81 78 (gcd x y)))
Note:
See TracChangeset
for help on using the changeset viewer.