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

◆ ctgexc()

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

CTGEXC

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

Purpose:
!>
!> CTGEXC 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 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 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 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 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 196 of file ctgexc.f.

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