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
|
---
:name: ctrevc
:md5sum: d514272127683844e93020ff209cd3db
:category: :subroutine
:arguments:
- side:
:type: char
:intent: input
- howmny:
:type: char
:intent: input
- select:
:type: logical
:intent: input
:dims:
- n
- n:
:type: integer
:intent: input
- t:
:type: complex
:intent: input/output
:dims:
- ldt
- n
- ldt:
:type: integer
:intent: input
- vl:
:type: complex
:intent: input/output
:dims:
- ldvl
- mm
- ldvl:
:type: integer
:intent: input
- vr:
:type: complex
:intent: input/output
:dims:
- ldvr
- mm
- ldvr:
:type: integer
:intent: input
- mm:
:type: integer
:intent: input
- m:
:type: integer
:intent: output
- work:
:type: complex
:intent: workspace
:dims:
- 2*n
- rwork:
:type: real
:intent: workspace
:dims:
- n
- info:
:type: integer
:intent: output
:substitutions: {}
:fortran_help: " SUBROUTINE CTREVC( SIDE, HOWMNY, SELECT, N, T, LDT, VL, LDVL, VR, LDVR, MM, M, WORK, RWORK, INFO )\n\n\
* Purpose\n\
* =======\n\
*\n\
* CTREVC computes some or all of the right and/or left eigenvectors of\n\
* a complex upper triangular matrix T.\n\
* Matrices of this type are produced by the Schur factorization of\n\
* a complex general matrix: A = Q*T*Q**H, as computed by CHSEQR.\n\
* \n\
* The right eigenvector x and the left eigenvector y of T corresponding\n\
* to an eigenvalue w are defined by:\n\
* \n\
* T*x = w*x, (y**H)*T = w*(y**H)\n\
* \n\
* where y**H denotes the conjugate transpose of the vector y.\n\
* The eigenvalues are not input to this routine, but are read directly\n\
* from the diagonal of T.\n\
* \n\
* This routine returns the matrices X and/or Y of right and left\n\
* eigenvectors of T, or the products Q*X and/or Q*Y, where Q is an\n\
* input matrix. If Q is the unitary factor that reduces a matrix A to\n\
* Schur form T, then Q*X and Q*Y are the matrices of right and left\n\
* eigenvectors of A.\n\
*\n\n\
* Arguments\n\
* =========\n\
*\n\
* SIDE (input) CHARACTER*1\n\
* = 'R': compute right eigenvectors only;\n\
* = 'L': compute left eigenvectors only;\n\
* = 'B': compute both right and left eigenvectors.\n\
*\n\
* HOWMNY (input) CHARACTER*1\n\
* = 'A': compute all right and/or left eigenvectors;\n\
* = 'B': compute all right and/or left eigenvectors,\n\
* backtransformed using the matrices supplied in\n\
* VR and/or VL;\n\
* = 'S': compute selected right and/or left eigenvectors,\n\
* as indicated by the logical array SELECT.\n\
*\n\
* SELECT (input) LOGICAL array, dimension (N)\n\
* If HOWMNY = 'S', SELECT specifies the eigenvectors to be\n\
* computed.\n\
* The eigenvector corresponding to the j-th eigenvalue is\n\
* computed if SELECT(j) = .TRUE..\n\
* Not referenced if HOWMNY = 'A' or 'B'.\n\
*\n\
* N (input) INTEGER\n\
* The order of the matrix T. N >= 0.\n\
*\n\
* T (input/output) COMPLEX array, dimension (LDT,N)\n\
* The upper triangular matrix T. T is modified, but restored\n\
* on exit.\n\
*\n\
* LDT (input) INTEGER\n\
* The leading dimension of the array T. LDT >= max(1,N).\n\
*\n\
* VL (input/output) COMPLEX array, dimension (LDVL,MM)\n\
* On entry, if SIDE = 'L' or 'B' and HOWMNY = 'B', VL must\n\
* contain an N-by-N matrix Q (usually the unitary matrix Q of\n\
* Schur vectors returned by CHSEQR).\n\
* On exit, if SIDE = 'L' or 'B', VL contains:\n\
* if HOWMNY = 'A', the matrix Y of left eigenvectors of T;\n\
* if HOWMNY = 'B', the matrix Q*Y;\n\
* if HOWMNY = 'S', the left eigenvectors of T specified by\n\
* SELECT, stored consecutively in the columns\n\
* of VL, in the same order as their\n\
* eigenvalues.\n\
* Not referenced if SIDE = 'R'.\n\
*\n\
* LDVL (input) INTEGER\n\
* The leading dimension of the array VL. LDVL >= 1, and if\n\
* SIDE = 'L' or 'B', LDVL >= N.\n\
*\n\
* VR (input/output) COMPLEX array, dimension (LDVR,MM)\n\
* On entry, if SIDE = 'R' or 'B' and HOWMNY = 'B', VR must\n\
* contain an N-by-N matrix Q (usually the unitary matrix Q of\n\
* Schur vectors returned by CHSEQR).\n\
* On exit, if SIDE = 'R' or 'B', VR contains:\n\
* if HOWMNY = 'A', the matrix X of right eigenvectors of T;\n\
* if HOWMNY = 'B', the matrix Q*X;\n\
* if HOWMNY = 'S', the right eigenvectors of T specified by\n\
* SELECT, stored consecutively in the columns\n\
* of VR, in the same order as their\n\
* eigenvalues.\n\
* Not referenced if SIDE = 'L'.\n\
*\n\
* LDVR (input) INTEGER\n\
* The leading dimension of the array VR. LDVR >= 1, and if\n\
* SIDE = 'R' or 'B'; LDVR >= N.\n\
*\n\
* MM (input) INTEGER\n\
* The number of columns in the arrays VL and/or VR. MM >= M.\n\
*\n\
* M (output) INTEGER\n\
* The number of columns in the arrays VL and/or VR actually\n\
* used to store the eigenvectors. If HOWMNY = 'A' or 'B', M\n\
* is set to N. Each selected eigenvector occupies one\n\
* column.\n\
*\n\
* WORK (workspace) COMPLEX array, dimension (2*N)\n\
*\n\
* RWORK (workspace) REAL array, dimension (N)\n\
*\n\
* INFO (output) INTEGER\n\
* = 0: successful exit\n\
* < 0: if INFO = -i, the i-th argument had an illegal value\n\
*\n\n\
* Further Details\n\
* ===============\n\
*\n\
* The algorithm used in this program is basically backward (forward)\n\
* substitution, with scaling to make the the code robust against\n\
* possible overflow.\n\
*\n\
* Each eigenvector is normalized so that the element of largest\n\
* magnitude has magnitude 1; here the magnitude of a complex number\n\
* (x,y) is taken to be |x| + |y|.\n\
*\n\
* =====================================================================\n\
*\n"
|