LAPACK 3.12.1
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches
zhecon_rook.f
Go to the documentation of this file.
1*> \brief <b> 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) </b>
2*
3* =========== DOCUMENTATION ===========
4*
5* Online html documentation available at
6* http://www.netlib.org/lapack/explore-html/
7*
8*> Download ZHECON_ROOK + dependencies
9*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zhecon_rook.f">
10*> [TGZ]</a>
11*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zhecon_rook.f">
12*> [ZIP]</a>
13*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zhecon_rook.f">
14*> [TXT]</a>
15*
16* Definition:
17* ===========
18*
19* SUBROUTINE ZHECON_ROOK( UPLO, N, A, LDA, IPIV, ANORM, RCOND, WORK,
20* INFO )
21*
22* .. Scalar Arguments ..
23* CHARACTER UPLO
24* INTEGER INFO, LDA, N
25* DOUBLE PRECISION ANORM, RCOND
26* ..
27* .. Array Arguments ..
28* INTEGER IPIV( * )
29* COMPLEX*16 A( LDA, * ), WORK( * )
30* ..
31*
32*
33*> \par Purpose:
34* =============
35*>
36*> \verbatim
37*>
38*> ZHECON_ROOK estimates the reciprocal of the condition number of a complex
39*> Hermitian matrix A using the factorization A = U*D*U**H or
40*> A = L*D*L**H computed by CHETRF_ROOK.
41*>
42*> An estimate is obtained for norm(inv(A)), and the reciprocal of the
43*> condition number is computed as RCOND = 1 / (ANORM * norm(inv(A))).
44*> \endverbatim
45*
46* Arguments:
47* ==========
48*
49*> \param[in] UPLO
50*> \verbatim
51*> UPLO is CHARACTER*1
52*> Specifies whether the details of the factorization are stored
53*> as an upper or lower triangular matrix.
54*> = 'U': Upper triangular, form is A = U*D*U**H;
55*> = 'L': Lower triangular, form is A = L*D*L**H.
56*> \endverbatim
57*>
58*> \param[in] N
59*> \verbatim
60*> N is INTEGER
61*> The order of the matrix A. N >= 0.
62*> \endverbatim
63*>
64*> \param[in] A
65*> \verbatim
66*> A is COMPLEX*16 array, dimension (LDA,N)
67*> The block diagonal matrix D and the multipliers used to
68*> obtain the factor U or L as computed by CHETRF_ROOK.
69*> \endverbatim
70*>
71*> \param[in] LDA
72*> \verbatim
73*> LDA is INTEGER
74*> The leading dimension of the array A. LDA >= max(1,N).
75*> \endverbatim
76*>
77*> \param[in] IPIV
78*> \verbatim
79*> IPIV is INTEGER array, dimension (N)
80*> Details of the interchanges and the block structure of D
81*> as determined by CHETRF_ROOK.
82*> \endverbatim
83*>
84*> \param[in] ANORM
85*> \verbatim
86*> ANORM is DOUBLE PRECISION
87*> The 1-norm of the original matrix A.
88*> \endverbatim
89*>
90*> \param[out] RCOND
91*> \verbatim
92*> RCOND is DOUBLE PRECISION
93*> The reciprocal of the condition number of the matrix A,
94*> computed as RCOND = 1/(ANORM * AINVNM), where AINVNM is an
95*> estimate of the 1-norm of inv(A) computed in this routine.
96*> \endverbatim
97*>
98*> \param[out] WORK
99*> \verbatim
100*> WORK is COMPLEX*16 array, dimension (2*N)
101*> \endverbatim
102*>
103*> \param[out] INFO
104*> \verbatim
105*> INFO is INTEGER
106*> = 0: successful exit
107*> < 0: if INFO = -i, the i-th argument had an illegal value
108*> \endverbatim
109*
110* Authors:
111* ========
112*
113*> \author Univ. of Tennessee
114*> \author Univ. of California Berkeley
115*> \author Univ. of Colorado Denver
116*> \author NAG Ltd.
117*
118*> \ingroup hecon_rook
119*
120*> \par Contributors:
121* ==================
122*> \verbatim
123*>
124*> June 2017, Igor Kozachenko,
125*> Computer Science Division,
126*> University of California, Berkeley
127*>
128*> September 2007, Sven Hammarling, Nicholas J. Higham, Craig Lucas,
129*> School of Mathematics,
130*> University of Manchester
131*>
132*> \endverbatim
133*
134* =====================================================================
135 SUBROUTINE zhecon_rook( UPLO, N, A, LDA, IPIV, ANORM, RCOND,
136 $ WORK,
137 $ INFO )
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*
249 END
subroutine xerbla(srname, info)
Definition cblat2.f:3285
subroutine zhecon_rook(uplo, n, a, lda, ipiv, anorm, rcond, work, info)
ZHECON_ROOK estimates the reciprocal of the condition number fort HE matrices using factorization obt...
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