262 SUBROUTINE ztrsen( JOB, COMPQ, SELECT, N, T, LDT, Q, LDQ, W, M, S,
263 $ SEP, WORK, LWORK, INFO )
271 INTEGER INFO, LDQ, LDT, LWORK, M, N
272 DOUBLE PRECISION S, SEP
276 COMPLEX*16 Q( LDQ, * ), T( LDT, * ), W( * ), WORK( * )
282 DOUBLE PRECISION ZERO, ONE
283 parameter( zero = 0.0d+0, one = 1.0d+0 )
286 LOGICAL LQUERY, WANTBH, WANTQ, WANTS, WANTSP
287 INTEGER IERR, K, KASE, KS, LWMIN, N1, N2, NN
288 DOUBLE PRECISION EST, RNORM, SCALE
292 DOUBLE PRECISION RWORK( 1 )
296 DOUBLE PRECISION ZLANGE
297 EXTERNAL lsame, zlange
309 wantbh = lsame( job,
'B' )
310 wants = lsame( job,
'E' ) .OR. wantbh
311 wantsp = lsame( job,
'V' ) .OR. wantbh
312 wantq = lsame( compq,
'V' )
327 lquery = ( lwork.EQ.-1 )
330 lwmin = max( 1, 2*nn )
331 ELSE IF( lsame( job,
'N' ) )
THEN
333 ELSE IF( lsame( job,
'E' ) )
THEN
337 IF( .NOT.lsame( job,
'N' ) .AND. .NOT.wants .AND. .NOT.wantsp )
340 ELSE IF( .NOT.lsame( compq,
'N' ) .AND. .NOT.wantq )
THEN
342 ELSE IF( n.LT.0 )
THEN
344 ELSE IF( ldt.LT.max( 1, n ) )
THEN
346 ELSE IF( ldq.LT.1 .OR. ( wantq .AND. ldq.LT.n ) )
THEN
348 ELSE IF( lwork.LT.lwmin .AND. .NOT.lquery )
THEN
357 CALL xerbla(
'ZTRSEN', -info )
359 ELSE IF( lquery )
THEN
365 IF( m.EQ.n .OR. m.EQ.0 )
THEN
369 $ sep = zlange(
'1', n, n, t, ldt, rwork )
377 IF(
SELECT( k ) )
THEN
383 $
CALL ztrexc( compq, n, t, ldt, q, ldq, k, ks, ierr )
393 CALL zlacpy(
'F', n1, n2, t( 1, n1+1 ), ldt, work, n1 )
394 CALL ztrsyl(
'N',
'N', -1, n1, n2, t, ldt, t( n1+1, n1+1 ),
395 $ ldt, work, n1, scale, ierr )
400 rnorm = zlange(
'F', n1, n2, work, n1, rwork )
401 IF( rnorm.EQ.zero )
THEN
404 s = scale / ( sqrt( scale*scale / rnorm+rnorm )*
416 CALL zlacn2( nn, work( nn+1 ), work, est, kase, isave )
422 CALL ztrsyl(
'N',
'N', -1, n1, n2, t, ldt,
423 $ t( n1+1, n1+1 ), ldt, work, n1, scale,
429 CALL ztrsyl(
'C',
'C', -1, n1, n2, t, ldt,
430 $ t( n1+1, n1+1 ), ldt, work, n1, scale,
subroutine xerbla(srname, info)
subroutine zlacn2(n, v, x, est, kase, isave)
ZLACN2 estimates the 1-norm of a square matrix, using reverse communication for evaluating matrix-vec...
subroutine zlacpy(uplo, m, n, a, lda, b, ldb)
ZLACPY copies all or part of one two-dimensional array to another.
subroutine ztrexc(compq, n, t, ldt, q, ldq, ifst, ilst, info)
ZTREXC
subroutine ztrsen(job, compq, select, n, t, ldt, q, ldq, w, m, s, sep, work, lwork, info)
ZTRSEN
subroutine ztrsyl(trana, tranb, isgn, m, n, a, lda, b, ldb, c, ldc, scale, info)
ZTRSYL