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

◆ zhecon_rook()

subroutine zhecon_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 )

ZHECON_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 ZHECON_ROOK + dependencies [TGZ] [ZIP] [TXT]

Purpose:
!>
!> ZHECON_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*16 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 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:
!>
!>  June 2017,  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 135 of file zhecon_rook.f.

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