314 SUBROUTINE strsen( JOB, COMPQ, SELECT, N, T, LDT, Q, LDQ, WR, WI,
315 $ m, s, sep, work, lwork, iwork, liwork, info )
324 INTEGER INFO, LDQ, LDT, LIWORK, LWORK, M, N
330 REAL Q( ldq, * ), T( ldt, * ), WI( * ), WORK( * ),
338 parameter ( zero = 0.0e+0, one = 1.0e+0 )
341 LOGICAL LQUERY, PAIR, SWAP, WANTBH, WANTQ, WANTS,
343 INTEGER IERR, K, KASE, KK, KS, LIWMIN, LWMIN, N1, N2,
345 REAL EST, RNORM, SCALE
353 EXTERNAL lsame, slange
359 INTRINSIC abs, max, sqrt
365 wantbh = lsame( job,
'B' )
366 wants = lsame( job,
'E' ) .OR. wantbh
367 wantsp = lsame( job,
'V' ) .OR. wantbh
368 wantq = lsame( compq,
'V' )
371 lquery = ( lwork.EQ.-1 )
372 IF( .NOT.lsame( job,
'N' ) .AND. .NOT.wants .AND. .NOT.wantsp )
375 ELSE IF( .NOT.lsame( compq,
'N' ) .AND. .NOT.wantq )
THEN
377 ELSE IF( n.LT.0 )
THEN
379 ELSE IF( ldt.LT.max( 1, n ) )
THEN
381 ELSE IF( ldq.LT.1 .OR. ( wantq .AND. ldq.LT.n ) )
THEN
395 IF( t( k+1, k ).EQ.zero )
THEN
400 IF(
SELECT( k ) .OR.
SELECT( k+1 ) )
415 lwmin = max( 1, 2*nn )
416 liwmin = max( 1, nn )
417 ELSE IF( lsame( job,
'N' ) )
THEN
420 ELSE IF( lsame( job,
'E' ) )
THEN
425 IF( lwork.LT.lwmin .AND. .NOT.lquery )
THEN
427 ELSE IF( liwork.LT.liwmin .AND. .NOT.lquery )
THEN
438 CALL xerbla(
'STRSEN', -info )
440 ELSE IF( lquery )
THEN
446 IF( m.EQ.n .OR. m.EQ.0 )
THEN
450 $ sep = slange(
'1', n, n, t, ldt, work )
464 IF( t( k+1, k ).NE.zero )
THEN
466 swap = swap .OR.
SELECT( k+1 )
477 $
CALL strexc( compq, n, t, ldt, q, ldq, kk, ks, work,
479 IF( ierr.EQ.1 .OR. ierr.EQ.2 )
THEN
502 CALL slacpy(
'F', n1, n2, t( 1, n1+1 ), ldt, work, n1 )
503 CALL strsyl(
'N',
'N', -1, n1, n2, t, ldt, t( n1+1, n1+1 ),
504 $ ldt, work, n1, scale, ierr )
509 rnorm = slange(
'F', n1, n2, work, n1, work )
510 IF( rnorm.EQ.zero )
THEN
513 s = scale / ( sqrt( scale*scale / rnorm+rnorm )*
525 CALL slacn2( nn, work( nn+1 ), work, iwork, est, kase, isave )
531 CALL strsyl(
'N',
'N', -1, n1, n2, t, ldt,
532 $ t( n1+1, n1+1 ), ldt, work, n1, scale,
538 CALL strsyl(
'T',
'T', -1, n1, n2, t, ldt,
539 $ t( n1+1, n1+1 ), ldt, work, n1, scale,
557 IF( t( k+1, k ).NE.zero )
THEN
558 wi( k ) = sqrt( abs( t( k, k+1 ) ) )*
559 $ sqrt( abs( t( k+1, k ) ) )
subroutine strsyl(TRANA, TRANB, ISGN, M, N, A, LDA, B, LDB, C, LDC, SCALE, INFO)
STRSYL
subroutine xerbla(SRNAME, INFO)
XERBLA
subroutine slacpy(UPLO, M, N, A, LDA, B, LDB)
SLACPY copies all or part of one two-dimensional array to another.
subroutine strexc(COMPQ, N, T, LDT, Q, LDQ, IFST, ILST, WORK, INFO)
STREXC
subroutine slacn2(N, V, X, ISGN, EST, KASE, ISAVE)
SLACN2 estimates the 1-norm of a square matrix, using reverse communication for evaluating matrix-vec...
subroutine strsen(JOB, COMPQ, SELECT, N, T, LDT, Q, LDQ, WR, WI, M, S, SEP, WORK, LWORK, IWORK, LIWORK, INFO)
STRSEN