LAPACK 3.12.0
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches

◆ zsycon_rook()

subroutine zsycon_rook ( character  uplo,
integer  n,
complex*16, dimension( lda, * )  a,
integer  lda,
integer, dimension( * )  ipiv,
double precision  anorm,
double precision  rcond,
complex*16, dimension( * )  work,
integer  info 
)

ZSYCON_ROOK

Download ZSYCON_ROOK + dependencies [TGZ] [ZIP] [TXT]

Purpose:
 ZSYCON_ROOK estimates the reciprocal of the condition number (in the
 1-norm) of a complex symmetric matrix A using the factorization
 A = U*D*U**T or A = L*D*L**T computed by ZSYTRF_ROOK.

 An estimate is obtained for norm(inv(A)), and the reciprocal of the
 condition number is computed as RCOND = 1 / (ANORM * norm(inv(A))).
Parameters
[in]UPLO
          UPLO is CHARACTER*1
          Specifies whether the details of the factorization are stored
          as an upper or lower triangular matrix.
          = 'U':  Upper triangular, form is A = U*D*U**T;
          = 'L':  Lower triangular, form is A = L*D*L**T.
[in]N
          N is INTEGER
          The order of the matrix A.  N >= 0.
[in]A
          A is COMPLEX*16 array, dimension (LDA,N)
          The block diagonal matrix D and the multipliers used to
          obtain the factor U or L as computed by ZSYTRF_ROOK.
[in]LDA
          LDA is INTEGER
          The leading dimension of the array A.  LDA >= max(1,N).
[in]IPIV
          IPIV is INTEGER array, dimension (N)
          Details of the interchanges and the block structure of D
          as determined by ZSYTRF_ROOK.
[in]ANORM
          ANORM is DOUBLE PRECISION
          The 1-norm of the original matrix A.
[out]RCOND
          RCOND is DOUBLE PRECISION
          The reciprocal of the condition number of the matrix A,
          computed as RCOND = 1/(ANORM * AINVNM), where AINVNM is an
          estimate of the 1-norm of inv(A) computed in this routine.
[out]WORK
          WORK is COMPLEX*16 array, dimension (2*N)
[out]INFO
          INFO is INTEGER
          = 0:  successful exit
          < 0:  if INFO = -i, the i-th argument had an illegal value
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Contributors:
   December 2016, Igor Kozachenko,
                  Computer Science Division,
                  University of California, Berkeley

  September 2007, Sven Hammarling, Nicholas J. Higham, Craig Lucas,
                  School of Mathematics,
                  University of Manchester

Definition at line 137 of file zsycon_rook.f.

139*
140* -- LAPACK computational routine --
141* -- LAPACK is a software package provided by Univ. of Tennessee, --
142* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
143*
144* .. Scalar Arguments ..
145 CHARACTER UPLO
146 INTEGER INFO, LDA, N
147 DOUBLE PRECISION ANORM, RCOND
148* ..
149* .. Array Arguments ..
150 INTEGER IPIV( * )
151 COMPLEX*16 A( LDA, * ), WORK( * )
152* ..
153*
154* =====================================================================
155*
156* .. Parameters ..
157 DOUBLE PRECISION ONE, ZERO
158 parameter( one = 1.0d+0, zero = 0.0d+0 )
159 COMPLEX*16 CZERO
160 parameter( czero = ( 0.0d+0, 0.0d+0 ) )
161* ..
162* .. Local Scalars ..
163 LOGICAL UPPER
164 INTEGER I, KASE
165 DOUBLE PRECISION AINVNM
166* ..
167* .. Local Arrays ..
168 INTEGER ISAVE( 3 )
169* ..
170* .. External Functions ..
171 LOGICAL LSAME
172 EXTERNAL lsame
173* ..
174* .. External Subroutines ..
175 EXTERNAL zlacn2, zsytrs_rook, xerbla
176* ..
177* .. Intrinsic Functions ..
178 INTRINSIC max
179* ..
180* .. Executable Statements ..
181*
182* Test the input parameters.
183*
184 info = 0
185 upper = lsame( uplo, 'U' )
186 IF( .NOT.upper .AND. .NOT.lsame( uplo, 'L' ) ) THEN
187 info = -1
188 ELSE IF( n.LT.0 ) THEN
189 info = -2
190 ELSE IF( lda.LT.max( 1, n ) ) THEN
191 info = -4
192 ELSE IF( anorm.LT.zero ) THEN
193 info = -6
194 END IF
195 IF( info.NE.0 ) THEN
196 CALL xerbla( 'ZSYCON_ROOK', -info )
197 RETURN
198 END IF
199*
200* Quick return if possible
201*
202 rcond = zero
203 IF( n.EQ.0 ) THEN
204 rcond = one
205 RETURN
206 ELSE IF( anorm.LE.zero ) THEN
207 RETURN
208 END IF
209*
210* Check that the diagonal matrix D is nonsingular.
211*
212 IF( upper ) THEN
213*
214* Upper triangular storage: examine D from bottom to top
215*
216 DO 10 i = n, 1, -1
217 IF( ipiv( i ).GT.0 .AND. a( i, i ).EQ.czero )
218 $ RETURN
219 10 CONTINUE
220 ELSE
221*
222* Lower triangular storage: examine D from top to bottom.
223*
224 DO 20 i = 1, n
225 IF( ipiv( i ).GT.0 .AND. a( i, i ).EQ.czero )
226 $ RETURN
227 20 CONTINUE
228 END IF
229*
230* Estimate the 1-norm of the inverse.
231*
232 kase = 0
233 30 CONTINUE
234 CALL zlacn2( n, work( n+1 ), work, ainvnm, kase, isave )
235 IF( kase.NE.0 ) THEN
236*
237* Multiply by inv(L*D*L**T) or inv(U*D*U**T).
238*
239 CALL zsytrs_rook( uplo, n, 1, a, lda, ipiv, work, n, info )
240 GO TO 30
241 END IF
242*
243* Compute the estimate of the reciprocal condition number.
244*
245 IF( ainvnm.NE.zero )
246 $ rcond = ( one / ainvnm ) / anorm
247*
248 RETURN
249*
250* End of ZSYCON_ROOK
251*
subroutine xerbla(srname, info)
Definition cblat2.f:3285
subroutine zsytrs_rook(uplo, n, nrhs, a, lda, ipiv, b, ldb, info)
ZSYTRS_ROOK
subroutine zlacn2(n, v, x, est, kase, isave)
ZLACN2 estimates the 1-norm of a square matrix, using reverse communication for evaluating matrix-vec...
Definition zlacn2.f:133
logical function lsame(ca, cb)
LSAME
Definition lsame.f:48
Here is the call graph for this function:
Here is the caller graph for this function: