1 2 SUBROUTINE CGEEV(A,LDA,N,E,V,LDV,WORK,JOB,INFO) 3C***BEGIN PROLOGUE CGEEV 4C***DATE WRITTEN 800808 (YYMMDD) 5C***REVISION DATE 820801 (YYMMDD) 6C***CATEGORY NO. D4A4 7C***KEYWORDS COMPLEX,EIGENVALUE,EIGENVECTOR,GENERAL MATRIX 8C***AUTHOR KAHANER, D. K., (NBS) 9C MOLER, C. B., (U. OF NEW MEXICO) 10C STEWART, G. W., (U. OF MARYLAND) 11C***PURPOSE To compute the eigenvalues and, optionally, the eigen- 12C vectors of a GENERAL COMPLEX matrix. 13C***DESCRIPTION 14C 15C LICEPACK. This version dated 08/08/80. 16C David Kahner, Cleve Moler, G. W. Stewart 17C N.B.S. U.N.M. N.B.S./U.MD. 18C 19C Abstract 20C CGEEV computes the eigenvalues and, optionally, 21C the eigenvectors of a general complex matrix. 22C 23C Call Sequence Parameters- 24C (The values of parameters marked with * (star) will be changed 25C by CGEEV.) 26C 27C A* COMPLEX(LDA,N) 28C complex nonsymmetric input matrix. 29C 30C LDA INTEGER 31C set by the user to 32C the leading dimension of the complex array A. 33C 34C N INTEGER 35C set by the user to 36C the order of the matrices A and V, and 37C the number of elements in E. 38C 39C E* COMPLEX(N) 40C on return from CGEEV E contains the eigenvalues of A. 41C See also INFO below. 42C 43C V* COMPLEX(LDV,N) 44C on return from CGEEV if the user has set JOB 45C = 0 V is not referenced. 46C = nonzero the N eigenvectors of A are stored in the 47C first N columns of V. See also INFO below. 48C (If the input matrix A is nearly degenerate, V 49C will be badly conditioned, i.e. have nearly 50C dependent columns.) 51C 52C LDV INTEGER 53C set by the user to 54C the leading dimension of the array V if JOB is also 55C set nonzero. In that case N must be .LE. LDV. 56C If JOB is set to zero LDV is not referenced. 57C 58C WORK* REAL(3N) 59C temporary storage vector. Contents changed by CGEEV. 60C 61C JOB INTEGER 62C set by the user to 63C = 0 eigenvalues only to be calculated by CGEEV. 64C neither V nor LDV are referenced. 65C = nonzero eigenvalues and vectors to be calculated. 66C In this case A & V must be distinct arrays. 67C Also, if LDA > LDV, CGEEV changes all the 68C elements of A thru column N. If LDA < LDV, 69C CGEEV changes all the elements of V through 70C column N. If LDA = LDV only A(I,J) and V(I, 71C J) for I,J = 1,...,N are changed by CGEEV. 72C 73C INFO* INTEGER 74C on return from CGEEV the value of INFO is 75C = 0 normal return, calculation successful. 76C = K if the eigenvalue iteration fails to converge, 77C eigenvalues K+1 through N are correct, but 78C no eigenvectors were computed even if they were 79C requested (JOB nonzero). 80C 81C Error Messages 82C No. 1 recoverable N is greater than LDA 83C No. 2 recoverable N is less than one. 84C No. 3 recoverable JOB is nonzero and N is greater than LDV 85C No. 4 warning LDA > LDV, elements of A other than the 86C N by N input elements have been changed 87C No. 5 warning LDA < LDV, elements of V other than the 88C N by N output elements have been changed 89C 90C 91C Subroutines Used 92C 93C EISPACK- CBABK2, CBAL, COMQR, COMQR2, CORTH 94C BLAS- SCOPY 95C SLATEC- XERROR 96C***REFERENCES (NONE) 97C***ROUTINES CALLED CBABK2,CBAL,COMQR,COMQR2,CORTH,SCOPY,XERROR 98C***END PROLOGUE CGEEV 99 100 101