LAPACK  3.6.1
LAPACK: Linear Algebra PACKage
subroutine checon_rook ( character  UPLO,
integer  N,
complex, dimension( lda, * )  A,
integer  LDA,
integer, dimension( * )  IPIV,
real  ANORM,
real  RCOND,
complex, dimension( * )  WORK,
integer  INFO 
)

CHECON_ROOK estimates the reciprocal of the condition number fort HE matrices using factorization obtained with one of the bounded diagonal pivoting methods (max 2 interchanges)

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

Purpose:
 CHECON_ROOK 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_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**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_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 CHETRF_ROOK.
[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
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Date
November 2013
Contributors:

November 2013, 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 141 of file checon_rook.f.

141 *
142 * -- LAPACK computational routine (version 3.5.0) --
143 * -- LAPACK is a software package provided by Univ. of Tennessee, --
144 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
145 * November 2013
146 *
147 * .. Scalar Arguments ..
148  CHARACTER uplo
149  INTEGER info, lda, n
150  REAL anorm, rcond
151 * ..
152 * .. Array Arguments ..
153  INTEGER ipiv( * )
154  COMPLEX a( lda, * ), work( * )
155 * ..
156 *
157 * =====================================================================
158 *
159 * .. Parameters ..
160  REAL one, zero
161  parameter ( one = 1.0e+0, zero = 0.0e+0 )
162 * ..
163 * .. Local Scalars ..
164  LOGICAL upper
165  INTEGER i, kase
166  REAL ainvnm
167 * ..
168 * .. Local Arrays ..
169  INTEGER isave( 3 )
170 * ..
171 * .. External Functions ..
172  LOGICAL lsame
173  EXTERNAL lsame
174 * ..
175 * .. External Subroutines ..
176  EXTERNAL chetrs_rook, clacn2, xerbla
177 * ..
178 * .. Intrinsic Functions ..
179  INTRINSIC max
180 * ..
181 * .. Executable Statements ..
182 *
183 * Test the input parameters.
184 *
185  info = 0
186  upper = lsame( uplo, 'U' )
187  IF( .NOT.upper .AND. .NOT.lsame( uplo, 'L' ) ) THEN
188  info = -1
189  ELSE IF( n.LT.0 ) THEN
190  info = -2
191  ELSE IF( lda.LT.max( 1, n ) ) THEN
192  info = -4
193  ELSE IF( anorm.LT.zero ) THEN
194  info = -6
195  END IF
196  IF( info.NE.0 ) THEN
197  CALL xerbla( 'CHECON_ROOK', -info )
198  RETURN
199  END IF
200 *
201 * Quick return if possible
202 *
203  rcond = zero
204  IF( n.EQ.0 ) THEN
205  rcond = one
206  RETURN
207  ELSE IF( anorm.LE.zero ) THEN
208  RETURN
209  END IF
210 *
211 * Check that the diagonal matrix D is nonsingular.
212 *
213  IF( upper ) THEN
214 *
215 * Upper triangular storage: examine D from bottom to top
216 *
217  DO 10 i = n, 1, -1
218  IF( ipiv( i ).GT.0 .AND. a( i, i ).EQ.zero )
219  $ RETURN
220  10 CONTINUE
221  ELSE
222 *
223 * Lower triangular storage: examine D from top to bottom.
224 *
225  DO 20 i = 1, n
226  IF( ipiv( i ).GT.0 .AND. a( i, i ).EQ.zero )
227  $ RETURN
228  20 CONTINUE
229  END IF
230 *
231 * Estimate the 1-norm of the inverse.
232 *
233  kase = 0
234  30 CONTINUE
235  CALL clacn2( n, work( n+1 ), work, ainvnm, kase, isave )
236  IF( kase.NE.0 ) THEN
237 *
238 * Multiply by inv(L*D*L**H) or inv(U*D*U**H).
239 *
240  CALL chetrs_rook( uplo, n, 1, a, lda, ipiv, work, n, info )
241  GO TO 30
242  END IF
243 *
244 * Compute the estimate of the reciprocal condition number.
245 *
246  IF( ainvnm.NE.zero )
247  $ rcond = ( one / ainvnm ) / anorm
248 *
249  RETURN
250 *
251 * End of CHECON_ROOK
252 *
subroutine chetrs_rook(UPLO, N, NRHS, A, LDA, IPIV, B, LDB, INFO)
CHETRS_ROOK computes the solution to a system of linear equations A * X = B for HE matrices using fac...
Definition: chetrs_rook.f:138
subroutine xerbla(SRNAME, INFO)
XERBLA
Definition: xerbla.f:62
logical function lsame(CA, CB)
LSAME
Definition: lsame.f:55
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:135

Here is the call graph for this function:

Here is the caller graph for this function: