 LAPACK  3.10.0 LAPACK: Linear Algebra PACKage

## ◆ checon()

 subroutine checon ( character UPLO, integer N, complex, dimension( lda, * ) A, integer LDA, integer, dimension( * ) IPIV, real ANORM, real RCOND, complex, dimension( * ) WORK, integer INFO )

CHECON

Purpose:
``` CHECON 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 CHETRF.

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 array, dimension (LDA,N) The block diagonal matrix D and the multipliers used to obtain the factor U or L as computed by CHETRF.``` [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 CHETRF.``` [in] ANORM ``` ANORM is REAL The 1-norm of the original matrix A.``` [out] RCOND ``` RCOND is REAL 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 array, dimension (2*N)` [out] INFO ``` INFO is INTEGER = 0: successful exit < 0: if INFO = -i, the i-th argument had an illegal value```

Definition at line 123 of file checon.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  REAL ANORM, RCOND
134 * ..
135 * .. Array Arguments ..
136  INTEGER IPIV( * )
137  COMPLEX A( LDA, * ), WORK( * )
138 * ..
139 *
140 * =====================================================================
141 *
142 * .. Parameters ..
143  REAL ONE, ZERO
144  parameter( one = 1.0e+0, zero = 0.0e+0 )
145 * ..
146 * .. Local Scalars ..
147  LOGICAL UPPER
148  INTEGER I, KASE
149  REAL 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 chetrs, clacn2, xerbla
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( 'CHECON', -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 clacn2( 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 chetrs( 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 CHECON
235 *
subroutine xerbla(SRNAME, INFO)
XERBLA
Definition: xerbla.f:60
logical function lsame(CA, CB)
LSAME
Definition: lsame.f:53
subroutine chetrs(UPLO, N, NRHS, A, LDA, IPIV, B, LDB, INFO)
CHETRS
Definition: chetrs.f:120
subroutine clacn2(N, V, X, EST, KASE, ISAVE)
CLACN2 estimates the 1-norm of a square matrix, using reverse communication for evaluating matrix-vec...
Definition: clacn2.f:133
Here is the call graph for this function:
Here is the caller graph for this function: