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

◆ ssycon_rook()

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

SSYCON_ROOK

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

Purpose:
!>
!> SSYCON_ROOK estimates the reciprocal of the condition number (in the
!> 1-norm) of a real symmetric matrix A using the factorization
!> A = U*D*U**T or A = L*D*L**T computed by SSYTRF_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 REAL array, dimension (LDA,N)
!>          The block diagonal matrix D and the multipliers used to
!>          obtain the factor U or L as computed by SSYTRF_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 SSYTRF_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 REAL array, dimension (2*N)
!> 
[out]IWORK
!>          IWORK is INTEGER array, dimension (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:
!>
!>   December 2016, 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 140 of file ssycon_rook.f.

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