123 SUBROUTINE ztrexc( COMPQ, N, T, LDT, Q, LDQ, IFST, ILST, INFO )
131 INTEGER IFST, ILST, INFO, LDQ, LDT, N
134 COMPLEX*16 Q( LDQ, * ), T( LDT, * )
141 INTEGER K, M1, M2, M3
143 COMPLEX*16 SN, T11, T22, TEMP
153 INTRINSIC dconjg, max
160 wantq = lsame( compq,
'V' )
161 IF( .NOT.lsame( compq,
'N' ) .AND. .NOT.wantq )
THEN
163 ELSE IF( n.LT.0 )
THEN
165 ELSE IF( ldt.LT.max( 1, n ) )
THEN
167 ELSE IF( ldq.LT.1 .OR. ( wantq .AND. ldq.LT.max( 1, n ) ) )
THEN
169 ELSE IF(( ifst.LT.1 .OR. ifst.GT.n ).AND.( n.GT.0 ))
THEN
171 ELSE IF(( ilst.LT.1 .OR. ilst.GT.n ).AND.( n.GT.0 ))
THEN
175 CALL xerbla(
'ZTREXC', -info )
181 IF( n.LE.1 .OR. ifst.EQ.ilst )
184 IF( ifst.LT.ilst )
THEN
200 DO 10 k = ifst + m1, ilst + m2, m3
209 CALL zlartg( t( k, k+1 ), t22-t11, cs, sn, temp )
214 $
CALL zrot( n-k-1, t( k, k+2 ), ldt, t( k+1, k+2 ), ldt,
217 CALL zrot( k-1, t( 1, k ), 1, t( 1, k+1 ), 1, cs,
227 CALL zrot( n, q( 1, k ), 1, q( 1, k+1 ), 1, cs,
subroutine zlartg(f, g, c, s, r)
ZLARTG generates a plane rotation with real cosine and complex sine.
subroutine zrot(n, cx, incx, cy, incy, c, s)
ZROT applies a plane rotation with real cosine and complex sine to a pair of complex vectors.
subroutine ztrexc(compq, n, t, ldt, q, ldq, ifst, ilst, info)
ZTREXC