1 *> \brief <b> CSYCON_ROOK </b>
3 * =========== DOCUMENTATION ===========
5 * Online html documentation available at
6 * http://www.netlib.org/lapack/explore-html/
9 *> Download CSYCON_ROOK + dependencies
10 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/csycon_rook.f">
12 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/csycon_rook.f">
14 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/csycon_rook.f">
21 * SUBROUTINE CSYCON_ROOK( UPLO, N, A, LDA, IPIV, ANORM, RCOND,
24 * .. Scalar Arguments ..
26 * INTEGER INFO, LDA, N
29 * .. Array Arguments ..
31 * COMPLEX A( LDA, * ), WORK( * )
40 *> CSYCON_ROOK 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_ROOK.
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_ROOK.
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_ROOK.
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
122 *> \ingroup complexSYcomputational
124 *> \par Contributors:
128 *> April 2012, Igor Kozachenko,
129 *> Computer Science Division,
130 *> University of California, Berkeley
132 *> September 2007, Sven Hammarling, Nicholas J. Higham, Craig Lucas,
133 *> School of Mathematics,
134 *> University of Manchester
138 * =====================================================================
139 SUBROUTINE CSYCON_ROOK( UPLO, N, A, LDA, IPIV, ANORM, RCOND, WORK,
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..--
147 * .. Scalar Arguments ..
152 * .. Array Arguments ..
154 COMPLEX A( LDA, * ), WORK( * )
157 * =====================================================================
161 PARAMETER ( ONE = 1.0E+0, ZERO = 0.0E+0 )
163 PARAMETER ( CZERO = ( 0.0E+0, 0.0E+0 ) )
165 * .. Local Scalars ..
173 * .. External Functions ..
177 * .. External Subroutines ..
178 EXTERNAL CLACN2, CSYTRS_ROOK, XERBLA
180 * .. Intrinsic Functions ..
183 * .. Executable Statements ..
185 * Test the input parameters.
188 UPPER = LSAME( UPLO, 'U' )
189 IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN
191 ELSE IF( N.LT.0 ) THEN
193 ELSE IF( LDA.LT.MAX( 1, N ) ) THEN
195 ELSE IF( ANORM.LT.ZERO ) THEN
199 CALL XERBLA( 'CSYCON_ROOK', -INFO )
203 * Quick return if possible
209 ELSE IF( ANORM.LE.ZERO ) THEN
213 * Check that the diagonal matrix D is nonsingular.
217 * Upper triangular storage: examine D from bottom to top
220 IF( IPIV( I ).GT.0 .AND. A( I, I ).EQ.CZERO )
225 * Lower triangular storage: examine D from top to bottom.
228 IF( IPIV( I ).GT.0 .AND. A( I, I ).EQ.CZERO )
233 * Estimate the 1-norm of the inverse.
237 CALL CLACN2( N, WORK( N+1 ), WORK, AINVNM, KASE, ISAVE )
240 * Multiply by inv(L*D*L**T) or inv(U*D*U**T).
242 CALL CSYTRS_ROOK( UPLO, N, 1, A, LDA, IPIV, WORK, N, INFO )
246 * Compute the estimate of the reciprocal condition number.
249 $ RCOND = ( ONE / AINVNM ) / ANORM