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

◆ zsycon()

subroutine zsycon ( 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

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

Purpose:
!>
!> ZSYCON 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.
!>
!> 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.
!> 
[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.
!> 
[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.

Definition at line 121 of file zsycon.f.

123*
124* -- LAPACK computational routine --
125* -- LAPACK is a software package provided by Univ. of Tennessee, --
126* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
127*
128* .. Scalar Arguments ..
129 CHARACTER UPLO
130 INTEGER INFO, LDA, N
131 DOUBLE PRECISION ANORM, RCOND
132* ..
133* .. Array Arguments ..
134 INTEGER IPIV( * )
135 COMPLEX*16 A( LDA, * ), WORK( * )
136* ..
137*
138* =====================================================================
139*
140* .. Parameters ..
141 DOUBLE PRECISION ONE, ZERO
142 parameter( one = 1.0d+0, zero = 0.0d+0 )
143* ..
144* .. Local Scalars ..
145 LOGICAL UPPER
146 INTEGER I, KASE
147 DOUBLE PRECISION AINVNM
148* ..
149* .. Local Arrays ..
150 INTEGER ISAVE( 3 )
151* ..
152* .. External Functions ..
153 LOGICAL LSAME
154 EXTERNAL lsame
155* ..
156* .. External Subroutines ..
157 EXTERNAL xerbla, zlacn2, zsytrs
158* ..
159* .. Intrinsic Functions ..
160 INTRINSIC max
161* ..
162* .. Executable Statements ..
163*
164* Test the input parameters.
165*
166 info = 0
167 upper = lsame( uplo, 'U' )
168 IF( .NOT.upper .AND. .NOT.lsame( uplo, 'L' ) ) THEN
169 info = -1
170 ELSE IF( n.LT.0 ) THEN
171 info = -2
172 ELSE IF( lda.LT.max( 1, n ) ) THEN
173 info = -4
174 ELSE IF( anorm.LT.zero ) THEN
175 info = -6
176 END IF
177 IF( info.NE.0 ) THEN
178 CALL xerbla( 'ZSYCON', -info )
179 RETURN
180 END IF
181*
182* Quick return if possible
183*
184 rcond = zero
185 IF( n.EQ.0 ) THEN
186 rcond = one
187 RETURN
188 ELSE IF( anorm.LE.zero ) THEN
189 RETURN
190 END IF
191*
192* Check that the diagonal matrix D is nonsingular.
193*
194 IF( upper ) THEN
195*
196* Upper triangular storage: examine D from bottom to top
197*
198 DO 10 i = n, 1, -1
199 IF( ipiv( i ).GT.0 .AND. a( i, i ).EQ.zero )
200 $ RETURN
201 10 CONTINUE
202 ELSE
203*
204* Lower triangular storage: examine D from top to bottom.
205*
206 DO 20 i = 1, n
207 IF( ipiv( i ).GT.0 .AND. a( i, i ).EQ.zero )
208 $ RETURN
209 20 CONTINUE
210 END IF
211*
212* Estimate the 1-norm of the inverse.
213*
214 kase = 0
215 30 CONTINUE
216 CALL zlacn2( n, work( n+1 ), work, ainvnm, kase, isave )
217 IF( kase.NE.0 ) THEN
218*
219* Multiply by inv(L*D*L**T) or inv(U*D*U**T).
220*
221 CALL zsytrs( uplo, n, 1, a, lda, ipiv, work, n, info )
222 GO TO 30
223 END IF
224*
225* Compute the estimate of the reciprocal condition number.
226*
227 IF( ainvnm.NE.zero )
228 $ rcond = ( one / ainvnm ) / anorm
229*
230 RETURN
231*
232* End of ZSYCON
233*
subroutine xerbla(srname, info)
Definition cblat2.f:3285
subroutine zsytrs(uplo, n, nrhs, a, lda, ipiv, b, ldb, info)
ZSYTRS
Definition zsytrs.f:118
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:131
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: