1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261
|
---
:name: zgegv
:md5sum: 96caca0b338719751521b432c1b15a00
:category: :subroutine
:arguments:
- jobvl:
:type: char
:intent: input
- jobvr:
:type: char
:intent: input
- n:
:type: integer
:intent: input
- a:
:type: doublecomplex
:intent: input/output
:dims:
- lda
- n
- lda:
:type: integer
:intent: input
- b:
:type: doublecomplex
:intent: input/output
:dims:
- ldb
- n
- ldb:
:type: integer
:intent: input
- alpha:
:type: doublecomplex
:intent: output
:dims:
- n
- beta:
:type: doublecomplex
:intent: output
:dims:
- n
- vl:
:type: doublecomplex
:intent: output
:dims:
- ldvl
- n
- ldvl:
:type: integer
:intent: input
- vr:
:type: doublecomplex
:intent: output
:dims:
- ldvr
- n
- ldvr:
:type: integer
:intent: input
- work:
:type: doublecomplex
:intent: output
:dims:
- MAX(1,lwork)
- lwork:
:type: integer
:intent: input
:option: true
:default: 2*n
- rwork:
:type: doublereal
:intent: output
:dims:
- 8*n
- info:
:type: integer
:intent: output
:substitutions:
ldvr: "lsame_(&jobvr,\"V\") ? n : 1"
ldvl: "lsame_(&jobvl,\"V\") ? n : 1"
:fortran_help: " SUBROUTINE ZGEGV( JOBVL, JOBVR, N, A, LDA, B, LDB, ALPHA, BETA, VL, LDVL, VR, LDVR, WORK, LWORK, RWORK, INFO )\n\n\
* Purpose\n\
* =======\n\
*\n\
* This routine is deprecated and has been replaced by routine ZGGEV.\n\
*\n\
* ZGEGV computes the eigenvalues and, optionally, the left and/or right\n\
* eigenvectors of a complex matrix pair (A,B).\n\
* Given two square matrices A and B,\n\
* the generalized nonsymmetric eigenvalue problem (GNEP) is to find the\n\
* eigenvalues lambda and corresponding (non-zero) eigenvectors x such\n\
* that\n\
* A*x = lambda*B*x.\n\
*\n\
* An alternate form is to find the eigenvalues mu and corresponding\n\
* eigenvectors y such that\n\
* mu*A*y = B*y.\n\
*\n\
* These two forms are equivalent with mu = 1/lambda and x = y if\n\
* neither lambda nor mu is zero. In order to deal with the case that\n\
* lambda or mu is zero or small, two values alpha and beta are returned\n\
* for each eigenvalue, such that lambda = alpha/beta and\n\
* mu = beta/alpha.\n\
*\n\
* The vectors x and y in the above equations are right eigenvectors of\n\
* the matrix pair (A,B). Vectors u and v satisfying\n\
* u**H*A = lambda*u**H*B or mu*v**H*A = v**H*B\n\
* are left eigenvectors of (A,B).\n\
*\n\
* Note: this routine performs \"full balancing\" on A and B -- see\n\
* \"Further Details\", below.\n\
*\n\n\
* Arguments\n\
* =========\n\
*\n\
* JOBVL (input) CHARACTER*1\n\
* = 'N': do not compute the left generalized eigenvectors;\n\
* = 'V': compute the left generalized eigenvectors (returned\n\
* in VL).\n\
*\n\
* JOBVR (input) CHARACTER*1\n\
* = 'N': do not compute the right generalized eigenvectors;\n\
* = 'V': compute the right generalized eigenvectors (returned\n\
* in VR).\n\
*\n\
* N (input) INTEGER\n\
* The order of the matrices A, B, VL, and VR. N >= 0.\n\
*\n\
* A (input/output) COMPLEX*16 array, dimension (LDA, N)\n\
* On entry, the matrix A.\n\
* If JOBVL = 'V' or JOBVR = 'V', then on exit A\n\
* contains the Schur form of A from the generalized Schur\n\
* factorization of the pair (A,B) after balancing. If no\n\
* eigenvectors were computed, then only the diagonal elements\n\
* of the Schur form will be correct. See ZGGHRD and ZHGEQZ\n\
* for details.\n\
*\n\
* LDA (input) INTEGER\n\
* The leading dimension of A. LDA >= max(1,N).\n\
*\n\
* B (input/output) COMPLEX*16 array, dimension (LDB, N)\n\
* On entry, the matrix B.\n\
* If JOBVL = 'V' or JOBVR = 'V', then on exit B contains the\n\
* upper triangular matrix obtained from B in the generalized\n\
* Schur factorization of the pair (A,B) after balancing.\n\
* If no eigenvectors were computed, then only the diagonal\n\
* elements of B will be correct. See ZGGHRD and ZHGEQZ for\n\
* details.\n\
*\n\
* LDB (input) INTEGER\n\
* The leading dimension of B. LDB >= max(1,N).\n\
*\n\
* ALPHA (output) COMPLEX*16 array, dimension (N)\n\
* The complex scalars alpha that define the eigenvalues of\n\
* GNEP.\n\
*\n\
* BETA (output) COMPLEX*16 array, dimension (N)\n\
* The complex scalars beta that define the eigenvalues of GNEP.\n\
* \n\
* Together, the quantities alpha = ALPHA(j) and beta = BETA(j)\n\
* represent the j-th eigenvalue of the matrix pair (A,B), in\n\
* one of the forms lambda = alpha/beta or mu = beta/alpha.\n\
* Since either lambda or mu may overflow, they should not,\n\
* in general, be computed.\n\
*\n\
* VL (output) COMPLEX*16 array, dimension (LDVL,N)\n\
* If JOBVL = 'V', the left eigenvectors u(j) are stored\n\
* in the columns of VL, in the same order as their eigenvalues.\n\
* Each eigenvector is scaled so that its largest component has\n\
* abs(real part) + abs(imag. part) = 1, except for eigenvectors\n\
* corresponding to an eigenvalue with alpha = beta = 0, which\n\
* are set to zero.\n\
* Not referenced if JOBVL = 'N'.\n\
*\n\
* LDVL (input) INTEGER\n\
* The leading dimension of the matrix VL. LDVL >= 1, and\n\
* if JOBVL = 'V', LDVL >= N.\n\
*\n\
* VR (output) COMPLEX*16 array, dimension (LDVR,N)\n\
* If JOBVR = 'V', the right eigenvectors x(j) are stored\n\
* in the columns of VR, in the same order as their eigenvalues.\n\
* Each eigenvector is scaled so that its largest component has\n\
* abs(real part) + abs(imag. part) = 1, except for eigenvectors\n\
* corresponding to an eigenvalue with alpha = beta = 0, which\n\
* are set to zero.\n\
* Not referenced if JOBVR = 'N'.\n\
*\n\
* LDVR (input) INTEGER\n\
* The leading dimension of the matrix VR. LDVR >= 1, and\n\
* if JOBVR = 'V', LDVR >= N.\n\
*\n\
* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))\n\
* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.\n\
*\n\
* LWORK (input) INTEGER\n\
* The dimension of the array WORK. LWORK >= max(1,2*N).\n\
* For good performance, LWORK must generally be larger.\n\
* To compute the optimal value of LWORK, call ILAENV to get\n\
* blocksizes (for ZGEQRF, ZUNMQR, and ZUNGQR.) Then compute:\n\
* NB -- MAX of the blocksizes for ZGEQRF, ZUNMQR, and ZUNGQR;\n\
* The optimal LWORK is MAX( 2*N, N*(NB+1) ).\n\
*\n\
* If LWORK = -1, then a workspace query is assumed; the routine\n\
* only calculates the optimal size of the WORK array, returns\n\
* this value as the first entry of the WORK array, and no error\n\
* message related to LWORK is issued by XERBLA.\n\
*\n\
* RWORK (workspace/output) DOUBLE PRECISION array, dimension (8*N)\n\
*\n\
* INFO (output) INTEGER\n\
* = 0: successful exit\n\
* < 0: if INFO = -i, the i-th argument had an illegal value.\n\
* =1,...,N:\n\
* The QZ iteration failed. No eigenvectors have been\n\
* calculated, but ALPHA(j) and BETA(j) should be\n\
* correct for j=INFO+1,...,N.\n\
* > N: errors that usually indicate LAPACK problems:\n\
* =N+1: error return from ZGGBAL\n\
* =N+2: error return from ZGEQRF\n\
* =N+3: error return from ZUNMQR\n\
* =N+4: error return from ZUNGQR\n\
* =N+5: error return from ZGGHRD\n\
* =N+6: error return from ZHGEQZ (other than failed\n\
* iteration)\n\
* =N+7: error return from ZTGEVC\n\
* =N+8: error return from ZGGBAK (computing VL)\n\
* =N+9: error return from ZGGBAK (computing VR)\n\
* =N+10: error return from ZLASCL (various calls)\n\
*\n\n\
* Further Details\n\
* ===============\n\
*\n\
* Balancing\n\
* ---------\n\
*\n\
* This driver calls ZGGBAL to both permute and scale rows and columns\n\
* of A and B. The permutations PL and PR are chosen so that PL*A*PR\n\
* and PL*B*R will be upper triangular except for the diagonal blocks\n\
* A(i:j,i:j) and B(i:j,i:j), with i and j as close together as\n\
* possible. The diagonal scaling matrices DL and DR are chosen so\n\
* that the pair DL*PL*A*PR*DR, DL*PL*B*PR*DR have elements close to\n\
* one (except for the elements that start out zero.)\n\
*\n\
* After the eigenvalues and eigenvectors of the balanced matrices\n\
* have been computed, ZGGBAK transforms the eigenvectors back to what\n\
* they would have been (in perfect arithmetic) if they had not been\n\
* balanced.\n\
*\n\
* Contents of A and B on Exit\n\
* -------- -- - --- - -- ----\n\
*\n\
* If any eigenvectors are computed (either JOBVL='V' or JOBVR='V' or\n\
* both), then on exit the arrays A and B will contain the complex Schur\n\
* form[*] of the \"balanced\" versions of A and B. If no eigenvectors\n\
* are computed, then only the diagonal blocks will be correct.\n\
*\n\
* [*] In other words, upper triangular form.\n\
*\n\
* =====================================================================\n\
*\n"
|