geev left eigenvectors

Paul Ledbetter III <[email protected]> Tue, 16 Aug 2005 16:23:10 -0500
Newsgroups gmane.lisp.matlisp.user
Message-ID <[email protected]>
Hello,  
  
  I noticed a problem with the geev-workspace-inquiry functions.  It
causes a problem if you do for instance (geev (eye 3) :vv).  This
patch should correct the issue.

Paul

Index: geev.lisp
===================================================================
RCS file: /cvsroot/matlisp/matlisp/src/geev.lisp,v
retrieving revision 1.10
diff -u -w -r1.10 geev.lisp
--- geev.lisp	26 Oct 2001 15:24:16 -0000	1.10
+++ geev.lisp	16 Aug 2005 20:32:41 -0000
@@ -249,7 +249,8 @@
 	  (:vv (values "V" "V")))
 
       (let* ((ldvr (if (equal jobvr "V") n 1))
-	     (xxx (allocate-complex-store ldvr)))
+	     (ldvl (if (equal jobvl "V") n 1))
+	     (xxx (allocate-complex-store 1))) ; this is a dummy variable
 
 	(multiple-value-bind (store-a store-wr store-wi store-vl store-vr
 				      work info)
@@ -261,7 +262,7 @@
 		   xxx			; WR
 		   xxx			; WI
 		   xxx			; VL
-		   1			; LDVL
+		   ldvl			; LDVL
 		   xxx			; VR
 		   ldvr			; LDVR
 		   work			; WORK
@@ -390,7 +391,8 @@
 	  (:vv (values "V" "V")))
       
       (let* ((ldvr (if (equal jobvr "V") n 1))
-	     (xxx (allocate-complex-store ldvr)))
+	     (ldvl (if (equal jobvl "V") n 1))
+	     (xxx (allocate-complex-store 1)))
 
 	(multiple-value-bind (store-a store-w store-vl store-vr work info)
 	    (zgeev jobvl
@@ -400,14 +402,15 @@
 		   n			; LDA
 		   xxx			; W
 		   xxx			; VL
-		   1			; LDVL
+		   ldvl			; LDVL
 		   xxx			; VR
 		   ldvr			; LDVR
 		   work			; WORK
 		   -1			; LWORK
 		   xxx			; RWORK
 		   0 )			; INFO
-	  (declare (ignore store-a store-w store-vl store-vr info))
+	  (declare (ignore store-a store-w store-vl store-vr))
+	  (assert (zerop info))
 	  ;; The desired size in in work[0], which we convert to an
 	  ;; integer.
 	  (ceiling (aref work 0)))))))


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf