LAPACK  3.6.1
LAPACK: Linear Algebra PACKage
subroutine dsycon ( character  UPLO,
integer  N,
double precision, dimension( lda, * )  A,
integer  LDA,
integer, dimension( * )  IPIV,
double precision  ANORM,
double precision  RCOND,
double precision, dimension( * )  WORK,
integer, dimension( * )  IWORK,
integer  INFO 
)

DSYCON

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

Purpose:
 DSYCON 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 DSYTRF.

 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 DOUBLE PRECISION array, dimension (LDA,N)
          The block diagonal matrix D and the multipliers used to
          obtain the factor U or L as computed by DSYTRF.
[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 DSYTRF.
[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 DOUBLE PRECISION 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.
Date
November 2011

Definition at line 132 of file dsycon.f.

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

Here is the call graph for this function:

Here is the caller graph for this function: