260 SUBROUTINE ctrsen( JOB, COMPQ, SELECT, N, T, LDT, Q, LDQ, W, M,
262 $ SEP, WORK, LWORK, INFO )
270 INTEGER INFO, LDQ, LDT, LWORK, M, N
275 COMPLEX Q( LDQ, * ), T( LDT, * ), W( * ), WORK( * )
282 PARAMETER ( ZERO = 0.0e+0, one = 1.0e+0 )
285 LOGICAL LQUERY, WANTBH, WANTQ, WANTS, WANTSP
286 INTEGER IERR, K, KASE, KS, LWMIN, N1, N2, NN
287 REAL EST, RNORM, SCALE
295 REAL CLANGE, SROUNDUP_LWORK
296 EXTERNAL lsame, clange, sroundup_lwork
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
353 work( 1 ) = sroundup_lwork(lwmin)
357 CALL xerbla(
'CTRSEN', -info )
359 ELSE IF( lquery )
THEN
365 IF( m.EQ.n .OR. m.EQ.0 )
THEN
369 $ sep = clange(
'1', n, n, t, ldt, rwork )
377 IF(
SELECT( k ) )
THEN
383 $
CALL ctrexc( compq, n, t, ldt, q, ldq, k, ks, ierr )
393 CALL clacpy(
'F', n1, n2, t( 1, n1+1 ), ldt, work, n1 )
394 CALL ctrsyl(
'N',
'N', -1, n1, n2, t, ldt, t( n1+1, n1+1 ),
395 $ ldt, work, n1, scale, ierr )
400 rnorm = clange(
'F', n1, n2, work, n1, rwork )
401 IF( rnorm.EQ.zero )
THEN
404 s = scale / ( sqrt( scale*scale / rnorm+rnorm )*
416 CALL clacn2( nn, work( nn+1 ), work, est, kase, isave )
422 CALL ctrsyl(
'N',
'N', -1, n1, n2, t, ldt,
423 $ t( n1+1, n1+1 ), ldt, work, n1, scale,
429 CALL ctrsyl(
'C',
'C', -1, n1, n2, t, ldt,
430 $ t( n1+1, n1+1 ), ldt, work, n1, scale,
447 work( 1 ) = sroundup_lwork(lwmin)
subroutine clacn2(n, v, x, est, kase, isave)
CLACN2 estimates the 1-norm of a square matrix, using reverse communication for evaluating matrix-vec...
subroutine ctrsen(job, compq, select, n, t, ldt, q, ldq, w, m, s, sep, work, lwork, info)
CTRSEN
subroutine ctrsyl(trana, tranb, isgn, m, n, a, lda, b, ldb, c, ldc, scale, info)
CTRSYL