260 SUBROUTINE ztrsen( JOB, COMPQ, SELECT, N, T, LDT, Q, LDQ, W, M,
262 $ SEP, WORK, LWORK, INFO )
270 INTEGER INFO, LDQ, LDT, LWORK, M, N
271 DOUBLE PRECISION S, SEP
275 COMPLEX*16 Q( LDQ, * ), T( LDT, * ), W( * ), WORK( * )
281 DOUBLE PRECISION ZERO, ONE
282 PARAMETER ( ZERO = 0.0d+0, one = 1.0d+0 )
285 LOGICAL LQUERY, WANTBH, WANTQ, WANTS, WANTSP
286 INTEGER IERR, K, KASE, KS, LWMIN, N1, N2, NN
287 DOUBLE PRECISION EST, RNORM, SCALE
291 DOUBLE PRECISION RWORK( 1 )
295 DOUBLE PRECISION ZLANGE
296 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 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 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