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
|
---
:name: stgexc
:md5sum: 5d3e5cea4ba4800679b5eae4b7a67cc3
:category: :subroutine
:arguments:
- wantq:
:type: logical
:intent: input
- wantz:
:type: logical
:intent: input
- n:
:type: integer
:intent: input
- a:
:type: real
:intent: input/output
:dims:
- lda
- n
- lda:
:type: integer
:intent: input
- b:
:type: real
:intent: input/output
:dims:
- ldb
- n
- ldb:
:type: integer
:intent: input
- q:
:type: real
:intent: input/output
:dims:
- ldz
- n
- ldq:
:type: integer
:intent: input
- z:
:type: real
:intent: input/output
:dims:
- ldz
- n
- ldz:
:type: integer
:intent: input
- ifst:
:type: integer
:intent: input/output
- ilst:
:type: integer
:intent: input/output
- work:
:type: real
:intent: output
:dims:
- MAX(1,lwork)
- lwork:
:type: integer
:intent: input
:option: true
:default: "n<=1 ? 1 : 4*n+16"
- info:
:type: integer
:intent: output
:substitutions: {}
:fortran_help: " SUBROUTINE STGEXC( WANTQ, WANTZ, N, A, LDA, B, LDB, Q, LDQ, Z, LDZ, IFST, ILST, WORK, LWORK, INFO )\n\n\
* Purpose\n\
* =======\n\
*\n\
* STGEXC reorders the generalized real Schur decomposition of a real\n\
* matrix pair (A,B) using an orthogonal equivalence transformation\n\
*\n\
* (A, B) = Q * (A, B) * Z',\n\
*\n\
* so that the diagonal block of (A, B) with row index IFST is moved\n\
* to row ILST.\n\
*\n\
* (A, B) must be in generalized real Schur canonical form (as returned\n\
* by SGGES), i.e. A is block upper triangular with 1-by-1 and 2-by-2\n\
* diagonal blocks. B is upper triangular.\n\
*\n\
* Optionally, the matrices Q and Z of generalized Schur vectors are\n\
* updated.\n\
*\n\
* Q(in) * A(in) * Z(in)' = Q(out) * A(out) * Z(out)'\n\
* Q(in) * B(in) * Z(in)' = Q(out) * B(out) * Z(out)'\n\
*\n\
*\n\n\
* Arguments\n\
* =========\n\
*\n\
* WANTQ (input) LOGICAL\n\
* .TRUE. : update the left transformation matrix Q;\n\
* .FALSE.: do not update Q.\n\
*\n\
* WANTZ (input) LOGICAL\n\
* .TRUE. : update the right transformation matrix Z;\n\
* .FALSE.: do not update Z.\n\
*\n\
* N (input) INTEGER\n\
* The order of the matrices A and B. N >= 0.\n\
*\n\
* A (input/output) REAL array, dimension (LDA,N)\n\
* On entry, the matrix A in generalized real Schur canonical\n\
* form.\n\
* On exit, the updated matrix A, again in generalized\n\
* real Schur canonical form.\n\
*\n\
* LDA (input) INTEGER\n\
* The leading dimension of the array A. LDA >= max(1,N).\n\
*\n\
* B (input/output) REAL array, dimension (LDB,N)\n\
* On entry, the matrix B in generalized real Schur canonical\n\
* form (A,B).\n\
* On exit, the updated matrix B, again in generalized\n\
* real Schur canonical form (A,B).\n\
*\n\
* LDB (input) INTEGER\n\
* The leading dimension of the array B. LDB >= max(1,N).\n\
*\n\
* Q (input/output) REAL array, dimension (LDZ,N)\n\
* On entry, if WANTQ = .TRUE., the orthogonal matrix Q.\n\
* On exit, the updated matrix Q.\n\
* If WANTQ = .FALSE., Q is not referenced.\n\
*\n\
* LDQ (input) INTEGER\n\
* The leading dimension of the array Q. LDQ >= 1.\n\
* If WANTQ = .TRUE., LDQ >= N.\n\
*\n\
* Z (input/output) REAL array, dimension (LDZ,N)\n\
* On entry, if WANTZ = .TRUE., the orthogonal matrix Z.\n\
* On exit, the updated matrix Z.\n\
* If WANTZ = .FALSE., Z is not referenced.\n\
*\n\
* LDZ (input) INTEGER\n\
* The leading dimension of the array Z. LDZ >= 1.\n\
* If WANTZ = .TRUE., LDZ >= N.\n\
*\n\
* IFST (input/output) INTEGER\n\
* ILST (input/output) INTEGER\n\
* Specify the reordering of the diagonal blocks of (A, B).\n\
* The block with row index IFST is moved to row ILST, by a\n\
* sequence of swapping between adjacent blocks.\n\
* On exit, if IFST pointed on entry to the second row of\n\
* a 2-by-2 block, it is changed to point to the first row;\n\
* ILST always points to the first row of the block in its\n\
* final position (which may differ from its input value by\n\
* +1 or -1). 1 <= IFST, ILST <= N.\n\
*\n\
* WORK (workspace/output) REAL 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.\n\
* LWORK >= 1 when N <= 1, otherwise LWORK >= 4*N + 16.\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\
* INFO (output) INTEGER\n\
* =0: successful exit.\n\
* <0: if INFO = -i, the i-th argument had an illegal value.\n\
* =1: The transformed matrix pair (A, B) would be too far\n\
* from generalized Schur form; the problem is ill-\n\
* conditioned. (A, B) may have been partially reordered,\n\
* and ILST points to the first row of the current\n\
* position of the block being moved.\n\
*\n\n\
* Further Details\n\
* ===============\n\
*\n\
* Based on contributions by\n\
* Bo Kagstrom and Peter Poromaa, Department of Computing Science,\n\
* Umea University, S-901 87 Umea, Sweden.\n\
*\n\
* [1] B. Kagstrom; A Direct Method for Reordering Eigenvalues in the\n\
* Generalized Real Schur Form of a Regular Matrix Pair (A, B), in\n\
* M.S. Moonen et al (eds), Linear Algebra for Large Scale and\n\
* Real-Time Applications, Kluwer Academic Publ. 1993, pp 195-218.\n\
*\n\
* =====================================================================\n\
*\n"
|