 LAPACK  3.6.1 LAPACK: Linear Algebra PACKage
 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

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 (LDZ,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.```
Date
November 2011
Contributors:
Bo Kagstrom and Peter Poromaa, Department of Computing Science, Umea University, S-901 87 Umea, Sweden.
References:
 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.
 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.
 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 202 of file ztgexc.f.

202 *
203 * -- LAPACK computational routine (version 3.4.0) --
204 * -- LAPACK is a software package provided by Univ. of Tennessee, --
205 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
206 * November 2011
207 *
208 * .. Scalar Arguments ..
209  LOGICAL wantq, wantz
210  INTEGER ifst, ilst, info, lda, ldb, ldq, ldz, n
211 * ..
212 * .. Array Arguments ..
213  COMPLEX*16 a( lda, * ), b( ldb, * ), q( ldq, * ),
214  \$ z( ldz, * )
215 * ..
216 *
217 * =====================================================================
218 *
219 * .. Local Scalars ..
220  INTEGER here
221 * ..
222 * .. External Subroutines ..
223  EXTERNAL xerbla, ztgex2
224 * ..
225 * .. Intrinsic Functions ..
226  INTRINSIC max
227 * ..
228 * .. Executable Statements ..
229 *
230 * Decode and test input arguments.
231  info = 0
232  IF( n.LT.0 ) THEN
233  info = -3
234  ELSE IF( lda.LT.max( 1, n ) ) THEN
235  info = -5
236  ELSE IF( ldb.LT.max( 1, n ) ) THEN
237  info = -7
238  ELSE IF( ldq.LT.1 .OR. wantq .AND. ( ldq.LT.max( 1, n ) ) ) THEN
239  info = -9
240  ELSE IF( ldz.LT.1 .OR. wantz .AND. ( ldz.LT.max( 1, n ) ) ) THEN
241  info = -11
242  ELSE IF( ifst.LT.1 .OR. ifst.GT.n ) THEN
243  info = -12
244  ELSE IF( ilst.LT.1 .OR. ilst.GT.n ) THEN
245  info = -13
246  END IF
247  IF( info.NE.0 ) THEN
248  CALL xerbla( 'ZTGEXC', -info )
249  RETURN
250  END IF
251 *
252 * Quick return if possible
253 *
254  IF( n.LE.1 )
255  \$ RETURN
256  IF( ifst.EQ.ilst )
257  \$ RETURN
258 *
259  IF( ifst.LT.ilst ) THEN
260 *
261  here = ifst
262 *
263  10 CONTINUE
264 *
265 * Swap with next one below
266 *
267  CALL ztgex2( wantq, wantz, n, a, lda, b, ldb, q, ldq, z, ldz,
268  \$ here, info )
269  IF( info.NE.0 ) THEN
270  ilst = here
271  RETURN
272  END IF
273  here = here + 1
274  IF( here.LT.ilst )
275  \$ GO TO 10
276  here = here - 1
277  ELSE
278  here = ifst - 1
279 *
280  20 CONTINUE
281 *
282 * Swap with next one above
283 *
284  CALL ztgex2( wantq, wantz, n, a, lda, b, ldb, q, ldq, z, ldz,
285  \$ here, info )
286  IF( info.NE.0 ) THEN
287  ilst = here
288  RETURN
289  END IF
290  here = here - 1
291  IF( here.GE.ilst )
292  \$ GO TO 20
293  here = here + 1
294  END IF
295  ilst = here
296  RETURN
297 *
298 * End of ZTGEXC
299 *
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:192
subroutine xerbla(SRNAME, INFO)
XERBLA
Definition: xerbla.f:62

Here is the call graph for this function:

Here is the caller graph for this function: