LAPACK  3.6.1
LAPACK: Linear Algebra PACKage
subroutine csycon ( character  UPLO,
integer  N,
complex, dimension( lda, * )  A,
integer  LDA,
integer, dimension( * )  IPIV,
real  ANORM,
real  RCOND,
complex, dimension( * )  WORK,
integer  INFO 
)

CSYCON

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

Purpose:
 CSYCON 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.

 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.
[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.
[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.
Date
November 2011

Definition at line 127 of file csycon.f.

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

Here is the call graph for this function:

Here is the caller graph for this function: