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

◆ csycon_rook()

subroutine csycon_rook ( character uplo,
integer n,
complex, dimension( lda, * ) a,
integer lda,
integer, dimension( * ) ipiv,
real anorm,
real rcond,
complex, dimension( * ) work,
integer info )

CSYCON_ROOK

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

Purpose:
!>
!> CSYCON_ROOK estimates the reciprocal of the condition number (in the
!> 1-norm) of a complex symmetric matrix A using the factorization
!> A = U*D*U**T or A = L*D*L**T computed by CSYTRF_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**T;
!>          = 'L':  Lower triangular, form is A = L*D*L**T.
!> 
[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 CSYTRF_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 CSYTRF_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.
Contributors:
!>
!>   April 2012, 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 csycon_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 REAL ANORM, RCOND
147* ..
148* .. Array Arguments ..
149 INTEGER IPIV( * )
150 COMPLEX A( LDA, * ), WORK( * )
151* ..
152*
153* =====================================================================
154*
155* .. Parameters ..
156 REAL ONE, ZERO
157 parameter( one = 1.0e+0, zero = 0.0e+0 )
158 COMPLEX CZERO
159 parameter( czero = ( 0.0e+0, 0.0e+0 ) )
160* ..
161* .. Local Scalars ..
162 LOGICAL UPPER
163 INTEGER I, KASE
164 REAL AINVNM
165* ..
166* .. Local Arrays ..
167 INTEGER ISAVE( 3 )
168* ..
169* .. External Functions ..
170 LOGICAL LSAME
171 EXTERNAL lsame
172* ..
173* .. External Subroutines ..
174 EXTERNAL clacn2, csytrs_rook, xerbla
175* ..
176* .. Intrinsic Functions ..
177 INTRINSIC max
178* ..
179* .. Executable Statements ..
180*
181* Test the input parameters.
182*
183 info = 0
184 upper = lsame( uplo, 'U' )
185 IF( .NOT.upper .AND. .NOT.lsame( uplo, 'L' ) ) THEN
186 info = -1
187 ELSE IF( n.LT.0 ) THEN
188 info = -2
189 ELSE IF( lda.LT.max( 1, n ) ) THEN
190 info = -4
191 ELSE IF( anorm.LT.zero ) THEN
192 info = -6
193 END IF
194 IF( info.NE.0 ) THEN
195 CALL xerbla( 'CSYCON_ROOK', -info )
196 RETURN
197 END IF
198*
199* Quick return if possible
200*
201 rcond = zero
202 IF( n.EQ.0 ) THEN
203 rcond = one
204 RETURN
205 ELSE IF( anorm.LE.zero ) THEN
206 RETURN
207 END IF
208*
209* Check that the diagonal matrix D is nonsingular.
210*
211 IF( upper ) THEN
212*
213* Upper triangular storage: examine D from bottom to top
214*
215 DO 10 i = n, 1, -1
216 IF( ipiv( i ).GT.0 .AND. a( i, i ).EQ.czero )
217 $ RETURN
218 10 CONTINUE
219 ELSE
220*
221* Lower triangular storage: examine D from top to bottom.
222*
223 DO 20 i = 1, n
224 IF( ipiv( i ).GT.0 .AND. a( i, i ).EQ.czero )
225 $ RETURN
226 20 CONTINUE
227 END IF
228*
229* Estimate the 1-norm of the inverse.
230*
231 kase = 0
232 30 CONTINUE
233 CALL clacn2( n, work( n+1 ), work, ainvnm, kase, isave )
234 IF( kase.NE.0 ) THEN
235*
236* Multiply by inv(L*D*L**T) or inv(U*D*U**T).
237*
238 CALL csytrs_rook( uplo, n, 1, a, lda, ipiv, work, n, info )
239 GO TO 30
240 END IF
241*
242* Compute the estimate of the reciprocal condition number.
243*
244 IF( ainvnm.NE.zero )
245 $ rcond = ( one / ainvnm ) / anorm
246*
247 RETURN
248*
249* End of CSYCON_ROOK
250*
subroutine xerbla(srname, info)
Definition cblat2.f:3285
subroutine csytrs_rook(uplo, n, nrhs, a, lda, ipiv, b, ldb, info)
CSYTRS_ROOK
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: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: