LAPACK 3.12.0
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches

◆ ztgexc()

subroutine ztgexc ( logical  wantq,
logical  wantz,
integer  n,
complex*16, dimension( lda, * )  a,
integer  lda,
complex*16, dimension( ldb, * )  b,
integer  ldb,
complex*16, dimension( ldq, * )  q,
integer  ldq,
complex*16, dimension( ldz, * )  z,
integer  ldz,
integer  ifst,
integer  ilst,
integer  info 
)

ZTGEXC

Download ZTGEXC + dependencies [TGZ] [ZIP] [TXT]

Purpose:
 ZTGEXC reorders the generalized Schur decomposition of a complex
 matrix pair (A,B), using an unitary equivalence transformation
 (A, B) := Q * (A, B) * Z**H, so that the diagonal block of (A, B) with
 row index IFST is moved to row ILST.

 (A, B) must be in generalized Schur canonical form, that is, A and
 B are both upper triangular.

 Optionally, the matrices Q and Z of generalized Schur vectors are
 updated.

        Q(in) * A(in) * Z(in)**H = Q(out) * A(out) * Z(out)**H
        Q(in) * B(in) * Z(in)**H = Q(out) * B(out) * Z(out)**H
Parameters
[in]WANTQ
          WANTQ is LOGICAL
          .TRUE. : update the left transformation matrix Q;
          .FALSE.: do not update Q.
[in]WANTZ
          WANTZ is LOGICAL
          .TRUE. : update the right transformation matrix Z;
          .FALSE.: do not update Z.
[in]N
          N is INTEGER
          The order of the matrices A and B. N >= 0.
[in,out]A
          A is COMPLEX*16 array, dimension (LDA,N)
          On entry, the upper triangular matrix A in the pair (A, B).
          On exit, the updated matrix A.
[in]LDA
          LDA is INTEGER
          The leading dimension of the array A. LDA >= max(1,N).
[in,out]B
          B is COMPLEX*16 array, dimension (LDB,N)
          On entry, the upper triangular matrix B in the pair (A, B).
          On exit, the updated matrix B.
[in]LDB
          LDB is INTEGER
          The leading dimension of the array B. LDB >= max(1,N).
[in,out]Q
          Q is COMPLEX*16 array, dimension (LDQ,N)
          On entry, if WANTQ = .TRUE., the unitary matrix Q.
          On exit, the updated matrix Q.
          If WANTQ = .FALSE., Q is not referenced.
[in]LDQ
          LDQ is INTEGER
          The leading dimension of the array Q. LDQ >= 1;
          If WANTQ = .TRUE., LDQ >= N.
[in,out]Z
          Z is COMPLEX*16 array, dimension (LDZ,N)
          On entry, if WANTZ = .TRUE., the unitary matrix Z.
          On exit, the updated matrix Z.
          If WANTZ = .FALSE., Z is not referenced.
[in]LDZ
          LDZ is INTEGER
          The leading dimension of the array Z. LDZ >= 1;
          If WANTZ = .TRUE., LDZ >= N.
[in]IFST
          IFST is INTEGER
[in,out]ILST
          ILST is INTEGER
          Specify the reordering of the diagonal blocks of (A, B).
          The block with row index IFST is moved to row ILST, by a
          sequence of swapping between adjacent blocks.
[out]INFO
          INFO is INTEGER
           =0:  Successful exit.
           <0:  if INFO = -i, the i-th argument had an illegal value.
           =1:  The transformed matrix pair (A, B) would be too far
                from generalized Schur form; the problem is ill-
                conditioned. (A, B) may have been partially reordered,
                and ILST points to the first row of the current
                position of the block being moved.
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Contributors:
Bo Kagstrom and Peter Poromaa, Department of Computing Science, Umea University, S-901 87 Umea, Sweden.
References:
[1] B. Kagstrom; A Direct Method for Reordering Eigenvalues in the Generalized Real Schur Form of a Regular Matrix Pair (A, B), in M.S. Moonen et al (eds), Linear Algebra for Large Scale and Real-Time Applications, Kluwer Academic Publ. 1993, pp 195-218.
[2] B. Kagstrom and P. Poromaa; Computing Eigenspaces with Specified Eigenvalues of a Regular Matrix Pair (A, B) and Condition Estimation: Theory, Algorithms and Software, Report UMINF - 94.04, Department of Computing Science, Umea University, S-901 87 Umea, Sweden, 1994. Also as LAPACK Working Note 87. To appear in Numerical Algorithms, 1996.
[3] B. Kagstrom and P. Poromaa, LAPACK-Style Algorithms and Software for Solving the Generalized Sylvester Equation and Estimating the Separation between Regular Matrix Pairs, Report UMINF - 93.23, Department of Computing Science, Umea University, S-901 87 Umea, Sweden, December 1993, Revised April 1994, Also as LAPACK working Note 75. To appear in ACM Trans. on Math. Software, Vol 22, No 1, 1996.

Definition at line 198 of file ztgexc.f.

200*
201* -- LAPACK computational routine --
202* -- LAPACK is a software package provided by Univ. of Tennessee, --
203* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
204*
205* .. Scalar Arguments ..
206 LOGICAL WANTQ, WANTZ
207 INTEGER IFST, ILST, INFO, LDA, LDB, LDQ, LDZ, N
208* ..
209* .. Array Arguments ..
210 COMPLEX*16 A( LDA, * ), B( LDB, * ), Q( LDQ, * ),
211 $ Z( LDZ, * )
212* ..
213*
214* =====================================================================
215*
216* .. Local Scalars ..
217 INTEGER HERE
218* ..
219* .. External Subroutines ..
220 EXTERNAL xerbla, ztgex2
221* ..
222* .. Intrinsic Functions ..
223 INTRINSIC max
224* ..
225* .. Executable Statements ..
226*
227* Decode and test input arguments.
228 info = 0
229 IF( n.LT.0 ) THEN
230 info = -3
231 ELSE IF( lda.LT.max( 1, n ) ) THEN
232 info = -5
233 ELSE IF( ldb.LT.max( 1, n ) ) THEN
234 info = -7
235 ELSE IF( ldq.LT.1 .OR. wantq .AND. ( ldq.LT.max( 1, n ) ) ) THEN
236 info = -9
237 ELSE IF( ldz.LT.1 .OR. wantz .AND. ( ldz.LT.max( 1, n ) ) ) THEN
238 info = -11
239 ELSE IF( ifst.LT.1 .OR. ifst.GT.n ) THEN
240 info = -12
241 ELSE IF( ilst.LT.1 .OR. ilst.GT.n ) THEN
242 info = -13
243 END IF
244 IF( info.NE.0 ) THEN
245 CALL xerbla( 'ZTGEXC', -info )
246 RETURN
247 END IF
248*
249* Quick return if possible
250*
251 IF( n.LE.1 )
252 $ RETURN
253 IF( ifst.EQ.ilst )
254 $ RETURN
255*
256 IF( ifst.LT.ilst ) THEN
257*
258 here = ifst
259*
260 10 CONTINUE
261*
262* Swap with next one below
263*
264 CALL ztgex2( wantq, wantz, n, a, lda, b, ldb, q, ldq, z, ldz,
265 $ here, info )
266 IF( info.NE.0 ) THEN
267 ilst = here
268 RETURN
269 END IF
270 here = here + 1
271 IF( here.LT.ilst )
272 $ GO TO 10
273 here = here - 1
274 ELSE
275 here = ifst - 1
276*
277 20 CONTINUE
278*
279* Swap with next one above
280*
281 CALL ztgex2( wantq, wantz, n, a, lda, b, ldb, q, ldq, z, ldz,
282 $ here, info )
283 IF( info.NE.0 ) THEN
284 ilst = here
285 RETURN
286 END IF
287 here = here - 1
288 IF( here.GE.ilst )
289 $ GO TO 20
290 here = here + 1
291 END IF
292 ilst = here
293 RETURN
294*
295* End of ZTGEXC
296*
subroutine xerbla(srname, info)
Definition cblat2.f:3285
subroutine ztgex2(wantq, wantz, n, a, lda, b, ldb, q, ldq, z, ldz, j1, info)
ZTGEX2 swaps adjacent diagonal blocks in an upper (quasi) triangular matrix pair by an unitary equiva...
Definition ztgex2.f:190
Here is the call graph for this function:
Here is the caller graph for this function: