Permalink
Browse files

WARNING- api change for generic function transpose, to transpose-matrix

Signed-off-by: AJ Rossini <blindglobe@gmail.com>
  • Loading branch information...
1 parent 1e1f52a commit 835c063100e9d9ade769424962b442f796de3eb5 @blindglobe committed Dec 19, 2009
Showing with 21 additions and 21 deletions.
  1. +2 −2 src/matrix.lisp
  2. +1 −1 src/package.lisp
  3. +11 −11 src/unittests/unittests-matrix-lapack.lisp
  4. +5 −5 src/unittests/unittests-matrix.lisp
  5. +2 −2 src/vector.lisp
View
4 src/matrix.lisp
@@ -1,6 +1,6 @@
;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*-
;;;
-;;; Time-stamp: <2009-07-14 11:51:31 tony>
+;;; Time-stamp: <2009-12-19 17:15:52 tony>
(in-package :lisp-matrix)
@@ -511,7 +511,7 @@
stride of MATRIX.")
(:method ((matrix matrix-like)) 'strided-matview))
-(defgeneric transpose (matrix)
+(defgeneric transpose-matrix (matrix)
(:documentation "Creates a transpose view of the given matrix-like
object MATRIX. Returns the original matrix if transposed two
times.
View
2 src/package.lisp
@@ -21,7 +21,7 @@
strides-class
strides unit-strides-p
window-class window
- transpose-class transpose transposed-p
+ transpose-class transpose-matrix transposed-p
zero-offset-p
offset
View
22 src/unittests/unittests-matrix-lapack.lisp
@@ -1,6 +1,6 @@
;;; -*- mode: lisp -*-
-;;; Time-stamp: <2009-09-21 17:23:47 tony>
+;;; Time-stamp: <2009-12-19 17:14:08 tony>
;;; Creation: <2009-03-12 17:14:56 tony>
;;; File: unittests-matrix-lapack.lisp
;;; Author: AJ Rossini <blindglobe@gmail.com>
@@ -221,8 +221,8 @@
( 6d0 7d0 )))))
(m* m3-fa m3-fa)
- (m* m2-fa (transpose m2-fa))
- (m* m3-fa (transpose m3-fa))))
+ (m* m2-fa (transpose-matrix m2-fa))
+ (m* m3-fa (transpose-matrix m3-fa))))
;;; Working, but needs to be extended for testing!
(addtest (lisp-matrix-ut-matrix-gemm)
@@ -234,7 +234,7 @@
:initial-contents #2A(( 1d0 2d0 )
( 6d0 7d0 )))))
(m* m3-la m3-la)
- (m* m3-la (transpose m3-la))))
+ (m* m3-la (transpose-matrix m3-la))))
(defun check-m* (a b)
@@ -253,7 +253,7 @@
(7d0 8d0))))
(def-m*-test m*-transpose-a
- (transpose
+ (transpose-matrix
(make-matrix 2 2 :initial-contents
'((1d0 3d0)
(2d0 4d0))))
@@ -265,14 +265,14 @@
(make-matrix 2 2 :initial-contents
'((1d0 2d0)
(3d0 4d0)))
- (transpose
+ (transpose-matrix
(make-matrix 2 2 :initial-contents
'((5d0 7d0)
(6d0 8d0)))))
(def-m*-test m*-double-transpose-a
- (transpose
- (transpose
+ (transpose-matrix
+ (transpose-matrix
(make-matrix 2 2 :initial-contents
'((1d0 2d0)
(3d0 4d0)))))
@@ -281,11 +281,11 @@
(7d0 8d0))))
(def-m*-test m*-transpose-a-b
- (transpose
+ (transpose-matrix
(make-matrix 2 2 :initial-contents
'((1d0 3d0)
(2d0 4d0))))
- (transpose
+ (transpose-matrix
(make-matrix 2 2 :initial-contents
'((5d0 7d0)
(6d0 8d0)))))
@@ -591,7 +591,7 @@
(col-offset (gen-integer :min 0 :max 10)
(<= col-offset (- m m2))))
(test-copy (rand n m))
- (test-copy (transpose (rand n m)))
+ (test-copy (transpose-matrix (rand n m)))
(test-copy (window (rand n m)
:nrows n2 :ncols m2
:row-offset row-offset
View
10 src/unittests/unittests-matrix.lisp
@@ -204,8 +204,8 @@
(for-all-implementations
(let ((m (make-matrix 3 3)))
(ensure (zero-offset-p m))
- (ensure (zero-offset-p (transpose m)))
- (ensure (zero-offset-p (transpose (transpose m))))
+ (ensure (zero-offset-p (transpose-matrix m)))
+ (ensure (zero-offset-p (transpose-matrix (transpose-matrix m))))
(ensure (zero-offset-p (window m :nrows 1)))
(ensure (zero-offset-p (strides m :ncols 1)))
(ensure (not (zero-offset-p (window m :row-offset 1 :nrows 1))))
@@ -219,16 +219,16 @@
(for-all-implementations
(let ((m (make-matrix 3 3)))
(ensure (unit-strides-p m))
- (ensure (unit-strides-p (transpose m)))
- (ensure (unit-strides-p (transpose (transpose m))))
+ (ensure (unit-strides-p (transpose-matrix m)))
+ (ensure (unit-strides-p (transpose-matrix (transpose-matrix m))))
(ensure (unit-strides-p (window m :nrows 1)))
(ensure (unit-strides-p (strides m :ncols 1)))
(ensure (unit-strides-p (window m :row-offset 1 :nrows 1)))
(ensure (unit-strides-p (window m :col-offset 1 :ncols 1)))
(ensure (unit-strides-p (strides m :row-offset 1 :nrows 1)))
(ensure (unit-strides-p (strides m :col-offset 1 :ncols 1)))
(ensure (not (unit-strides-p (strides m :row-stride 2 :nrows 2))))
- (ensure (not (unit-strides-p (transpose (strides m :row-stride 2 :nrows 2)))))
+ (ensure (not (unit-strides-p (transpose-matrix (strides m :row-stride 2 :nrows 2)))))
(ensure (not (unit-strides-p (window (strides m :row-stride 2 :nrows 2)))))
(ensure (not (unit-strides-p (strides (strides m :row-stride 2 :nrows 2))))))))
View
4 src/vector.lisp
@@ -369,7 +369,7 @@
:nelts (ncols matrix)
:type :row))))
(:method ((matrix transpose-matview) (i integer))
- (transpose (col (parent matrix) i)))
+ (transpose-matrix (col (parent matrix) i)))
(:method ((matrix window-matview) (i integer))
(assert (< -1 i (nrows matrix)))
(ecase (orientation matrix)
@@ -405,7 +405,7 @@
(defgeneric col (matrix j)
(:documentation "Return a view on a given column of MATRIX.")
(:method ((matrix transpose-matview) (j integer))
- (transpose (row (parent matrix) j)))
+ (transpose-matrix (row (parent matrix) j)))
(:method ((matrix matrix-like) (j integer))
(assert (< -1 j (ncols matrix)))
(ecase (orientation matrix)

0 comments on commit 835c063

Please sign in to comment.