[lisplab-cvs] r75 - in src: linalg matrix
Jørn Inge Vestgården
jivestgarden at common-lisp.net
Sat Aug 8 17:59:06 UTC 2009
Author: jivestgarden
Date: Sat Aug 8 13:59:06 2009
New Revision: 75
Log:
fill changed to mfill
Modified:
src/linalg/level3-linalg-blas-real.lisp
src/linalg/level3-linalg-generic.lisp
src/matrix/level2-array-functions.lisp
src/matrix/level2-generic.lisp
src/matrix/level2-interface.lisp
src/matrix/level2-matrix-dge.lisp
src/matrix/level2-matrix-zge.lisp
Modified: src/linalg/level3-linalg-blas-real.lisp
==============================================================================
--- src/linalg/level3-linalg-blas-real.lisp (original)
+++ src/linalg/level3-linalg-blas-real.lisp Sat Aug 8 13:59:06 2009
@@ -153,7 +153,7 @@
(N (rows A)))
(destructuring-bind (LU p det)
(LU-factor! LU (make-permutation-vector N))
- (fill! A 0)
+ (mfill A 0)
(dotimes (i N)
(setf (mref A i (vref p i)) 1)
(LU-solve!-blas-real LU A (vref p i)))))
Modified: src/linalg/level3-linalg-generic.lisp
==============================================================================
--- src/linalg/level3-linalg-generic.lisp (original)
+++ src/linalg/level3-linalg-generic.lisp Sat Aug 8 13:59:06 2009
@@ -55,7 +55,7 @@
(let ((LU (copy A)))
(destructuring-bind (LU p det)
(LU-factor! LU (make-permutation-vector (rows A)))
- (fill! A 0) ; Use A for the results
+ (mfill A 0) ; Use A for the results
(dotimes (i (rows A))
(let ((col (view-col A (vref p i))))
(setf (vref col i) 1)
Modified: src/matrix/level2-array-functions.lisp
==============================================================================
--- src/matrix/level2-array-functions.lisp (original)
+++ src/matrix/level2-array-functions.lisp Sat Aug 8 13:59:06 2009
@@ -54,7 +54,7 @@
(setf (row-major-aref ,c ,i)
(,old (row-major-aref ,c ,i) (row-major-aref ,b ,i))))
,c)
- (let ((,c (create ,a 0)))
+ (let ((,c (mcreate ,a 0)))
(dotimes (,i (min (size ,c) (size ,a)))
(setf (vref ,c ,i)
(,new (vref ,a ,i) (vref ,b ,i))))
@@ -72,7 +72,7 @@
(setf (row-major-aref ,c ,i)
(,old (row-major-aref ,c ,i) ,b)))
,c)
- (let ((,c (create ,a 0)))
+ (let ((,c (mcreate ,a 0)))
(dotimes (,i (size ,c))
(setf (vref ,c ,i)
(,new (vref ,a ,i) ,b)))
@@ -90,7 +90,7 @@
(setf (row-major-aref ,c ,i)
(,old ,b (row-major-aref ,c ,i))))
,c)
- (let ((,c (create ,b 0)))
+ (let ((,c (mcreate ,b 0)))
(dotimes (,i (size ,c))
(setf (vref ,c ,i)
(,new ,b (vref ,b ,i))))
@@ -116,7 +116,7 @@
(declare (type double-float ,x))
(setf (row-major-aref ,y ,i) ,form)))
,y)
- (let ((,y (create ,x 0)))
+ (let ((,y (mcreate ,x 0)))
(dotimes (,i (size ,y))
(let ((,x (vref ,x ,i)))
(setf (vref ,y ,i) ,form)))
@@ -136,7 +136,7 @@
(declare (type double-float ,x))
(setf (row-major-aref ,y ,i) ,form)))
,y)
- (let ((,y (create ,x 0))) ; TOOD must make sure to allow complex values
+ (let ((,y (mcreate ,x 0))) ; TOOD must make sure to allow complex values
(dotimes (,i (size ,y))
(let ((,x (vref ,x ,i)))
(setf (vref ,y ,i) ,form)))
Modified: src/matrix/level2-generic.lisp
==============================================================================
--- src/matrix/level2-generic.lisp (original)
+++ src/matrix/level2-generic.lisp Sat Aug 8 13:59:06 2009
@@ -137,8 +137,7 @@
(setf min (vref m i))))
min))
-(defmethod fill! ((a matrix-base) val)
- "Sets all elemnts of a to val."
+(defmethod mfill ((a matrix-base) val)
(dotimes (i (size a))
(setf (vref a i) val))
val)
Modified: src/matrix/level2-interface.lisp
==============================================================================
--- src/matrix/level2-interface.lisp (original)
+++ src/matrix/level2-interface.lisp Sat Aug 8 13:59:06 2009
@@ -27,7 +27,7 @@
mnew
mcreate
copy-contents
- .map mmap fill!
+ .map mmap mfill
; dlmwrite dlmread
to-vector! to-vector
to-matrix! to-matrix
@@ -63,10 +63,6 @@
(defgeneric mnew (class value rows &optional cols)
(:documentation "General matrix constructor. Creates a new matrix filled with numeric arguments."))
-(defgeneric create (a &optional value dim)
- (:documentation "Deprecated. Use mcreate in stead. Creates a new matrix of the same type and with the same value as the other,
-but with all elements set to value."))
-
(defgeneric mcreate (a &optional value dim)
(:documentation "Creates a new matrix of the same type and with the same value as the other,
but with all elements set to value."))
@@ -149,7 +145,7 @@
(:documentation "Maps the function on each element. The returned
object has dimensionality of the first object"))
-(defgeneric fill! (a value)
+(defgeneric mfill (a value)
(:documentation "Sets each element to the value. Destructive"))
Modified: src/matrix/level2-matrix-dge.lisp
==============================================================================
--- src/matrix/level2-matrix-dge.lisp (original)
+++ src/matrix/level2-matrix-dge.lisp Sat Aug 8 13:59:06 2009
@@ -19,7 +19,7 @@
(in-package :lisplab)
-(defmethod fill! ((a matrix-base-dge) value)
+(defmethod mfill ((a matrix-base-dge) value)
(let ((x (coerce value 'double-float))
(store (matrix-store a)))
(declare (type type-blas-store store))
Modified: src/matrix/level2-matrix-zge.lisp
==============================================================================
--- src/matrix/level2-matrix-zge.lisp (original)
+++ src/matrix/level2-matrix-zge.lisp Sat Aug 8 13:59:06 2009
@@ -18,7 +18,7 @@
(in-package :lisplab)
-(defmethod fill! ((a matrix-base-zge) value)
+(defmethod mfill ((a matrix-base-zge) value)
(let ((rx (coerce (realpart value) 'double-float))
(cx (coerce (imagpart value) 'double-float))
(store (matrix-store a)))
More information about the lisplab-cvs
mailing list