LAPACK  3.6.1
LAPACK: Linear Algebra PACKage
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.
Date
April 2012
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 141 of file csycon_rook.f.

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