LAPACK  3.10.0
LAPACK: Linear Algebra PACKage

◆ zhecon()

subroutine zhecon ( 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 
)

ZHECON

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

Purpose:
 ZHECON estimates the reciprocal of the condition number of a complex
 Hermitian matrix A using the factorization A = U*D*U**H or
 A = L*D*L**H computed by ZHETRF.

 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**H;
          = 'L':  Lower triangular, form is A = L*D*L**H.
[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 ZHETRF.
[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 ZHETRF.
[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 123 of file zhecon.f.

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