3 * =========== DOCUMENTATION ===========
5 * Online html documentation available at
6 * http://www.netlib.org/lapack/explore-html/
9 *> Download CSYCON + dependencies
10 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/csycon.f">
12 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/csycon.f">
14 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/csycon.f">
21 * SUBROUTINE CSYCON( UPLO, N, A, LDA, IPIV, ANORM, RCOND, WORK,
24 * .. Scalar Arguments ..
26 * INTEGER INFO, LDA, N
29 * .. Array Arguments ..
31 * COMPLEX A( LDA, * ), WORK( * )
40 *> CSYCON estimates the reciprocal of the condition number (in the
41 *> 1-norm) of a complex symmetric matrix A using the factorization
42 *> A = U*D*U**T or A = L*D*L**T computed by CSYTRF.
44 *> An estimate is obtained for norm(inv(A)), and the reciprocal of the
45 *> condition number is computed as RCOND = 1 / (ANORM * norm(inv(A))).
53 *> UPLO is CHARACTER*1
54 *> Specifies whether the details of the factorization are stored
55 *> as an upper or lower triangular matrix.
56 *> = 'U': Upper triangular, form is A = U*D*U**T;
57 *> = 'L': Lower triangular, form is A = L*D*L**T.
63 *> The order of the matrix A. N >= 0.
68 *> A is COMPLEX array, dimension (LDA,N)
69 *> The block diagonal matrix D and the multipliers used to
70 *> obtain the factor U or L as computed by CSYTRF.
76 *> The leading dimension of the array A. LDA >= max(1,N).
81 *> IPIV is INTEGER array, dimension (N)
82 *> Details of the interchanges and the block structure of D
83 *> as determined by CSYTRF.
89 *> The 1-norm of the original matrix A.
95 *> The reciprocal of the condition number of the matrix A,
96 *> computed as RCOND = 1/(ANORM * AINVNM), where AINVNM is an
97 *> estimate of the 1-norm of inv(A) computed in this routine.
102 *> WORK is COMPLEX array, dimension (2*N)
108 *> = 0: successful exit
109 *> < 0: if INFO = -i, the i-th argument had an illegal value
115 *> \author Univ. of Tennessee
116 *> \author Univ. of California Berkeley
117 *> \author Univ. of Colorado Denver
120 *> \date November 2011
122 *> \ingroup complexSYcomputational
124 * =====================================================================
125 SUBROUTINE CSYCON( UPLO, N, A, LDA, IPIV, ANORM, RCOND, WORK,
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..--
133 * .. Scalar Arguments ..
138 * .. Array Arguments ..
140 COMPLEX A( LDA, * ), WORK( * )
143 * =====================================================================
147 PARAMETER ( ONE = 1.0E+0, ZERO = 0.0E+0 )
149 * .. Local Scalars ..
157 * .. External Functions ..
161 * .. External Subroutines ..
162 EXTERNAL CLACN2, CSYTRS, XERBLA
164 * .. Intrinsic Functions ..
167 * .. Executable Statements ..
169 * Test the input parameters.
172 UPPER = LSAME( UPLO, 'U' )
173 IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN
175 ELSE IF( N.LT.0 ) THEN
177 ELSE IF( LDA.LT.MAX( 1, N ) ) THEN
179 ELSE IF( ANORM.LT.ZERO ) THEN
183 CALL XERBLA( 'CSYCON', -INFO )
187 * Quick return if possible
193 ELSE IF( ANORM.LE.ZERO ) THEN
197 * Check that the diagonal matrix D is nonsingular.
201 * Upper triangular storage: examine D from bottom to top
204 IF( IPIV( I ).GT.0 .AND. A( I, I ).EQ.ZERO )
209 * Lower triangular storage: examine D from top to bottom.
212 IF( IPIV( I ).GT.0 .AND. A( I, I ).EQ.ZERO )
217 * Estimate the 1-norm of the inverse.
221 CALL CLACN2( N, WORK( N+1 ), WORK, AINVNM, KASE, ISAVE )
224 * Multiply by inv(L*D*L**T) or inv(U*D*U**T).
226 CALL CSYTRS( UPLO, N, 1, A, LDA, IPIV, WORK, N, INFO )
230 * Compute the estimate of the reciprocal condition number.
233 $ RCOND = ( ONE / AINVNM ) / ANORM