1 *> \brief \b ZLA_SYRCOND_X computes the infinity norm condition number of op(A)*diag(x) for symmetric indefinite matrices.
3 * =========== DOCUMENTATION ===========
5 * Online html documentation available at
6 * http://www.netlib.org/lapack/explore-html/
9 *> Download ZLA_SYRCOND_X + dependencies
10 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zla_syrcond_x.f">
12 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zla_syrcond_x.f">
14 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zla_syrcond_x.f">
21 * DOUBLE PRECISION FUNCTION ZLA_SYRCOND_X( UPLO, N, A, LDA, AF,
22 * LDAF, IPIV, X, INFO,
25 * .. Scalar Arguments ..
27 * INTEGER N, LDA, LDAF, INFO
29 * .. Array Arguments ..
31 * COMPLEX*16 A( LDA, * ), AF( LDAF, * ), WORK( * ), X( * )
32 * DOUBLE PRECISION RWORK( * )
41 *> ZLA_SYRCOND_X Computes the infinity norm condition number of
42 *> op(A) * diag(X) where X is a COMPLEX*16 vector.
50 *> UPLO is CHARACTER*1
51 *> = 'U': Upper triangle of A is stored;
52 *> = 'L': Lower triangle of A is stored.
58 *> The number of linear equations, i.e., the order of the
64 *> A is COMPLEX*16 array, dimension (LDA,N)
65 *> On entry, the N-by-N matrix A.
71 *> The leading dimension of the array A. LDA >= max(1,N).
76 *> AF is COMPLEX*16 array, dimension (LDAF,N)
77 *> The block diagonal matrix D and the multipliers used to
78 *> obtain the factor U or L as computed by ZSYTRF.
84 *> The leading dimension of the array AF. LDAF >= max(1,N).
89 *> IPIV is INTEGER array, dimension (N)
90 *> Details of the interchanges and the block structure of D
91 *> as determined by ZSYTRF.
96 *> X is COMPLEX*16 array, dimension (N)
97 *> The vector X in the formula op(A) * diag(X).
103 *> = 0: Successful exit.
104 *> i > 0: The ith argument is invalid.
109 *> WORK is COMPLEX*16 array, dimension (2*N).
115 *> RWORK is DOUBLE PRECISION array, dimension (N).
122 *> \author Univ. of Tennessee
123 *> \author Univ. of California Berkeley
124 *> \author Univ. of Colorado Denver
127 *> \date September 2012
129 *> \ingroup complex16SYcomputational
131 * =====================================================================
132 DOUBLE PRECISION FUNCTION ZLA_SYRCOND_X( UPLO, N, A, LDA, AF,
133 $ LDAF, IPIV, X, INFO,
136 * -- LAPACK computational routine (version 3.4.2) --
137 * -- LAPACK is a software package provided by Univ. of Tennessee, --
138 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
141 * .. Scalar Arguments ..
143 INTEGER N, LDA, LDAF, INFO
145 * .. Array Arguments ..
147 COMPLEX*16 A( LDA, * ), AF( LDAF, * ), WORK( * ), X( * )
148 DOUBLE PRECISION RWORK( * )
151 * =====================================================================
153 * .. Local Scalars ..
155 DOUBLE PRECISION AINVNM, ANORM, TMP
163 * .. External Functions ..
167 * .. External Subroutines ..
168 EXTERNAL ZLACN2, ZSYTRS, XERBLA
170 * .. Intrinsic Functions ..
173 * .. Statement Functions ..
174 DOUBLE PRECISION CABS1
176 * .. Statement Function Definitions ..
177 CABS1( ZDUM ) = ABS( DBLE( ZDUM ) ) + ABS( DIMAG( ZDUM ) )
179 * .. Executable Statements ..
181 ZLA_SYRCOND_X = 0.0D+0
184 UPPER = LSAME( UPLO, 'U' )
185 IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN
187 ELSE IF( N.LT.0 ) THEN
189 ELSE IF( LDA.LT.MAX( 1, N ) ) THEN
191 ELSE IF( LDAF.LT.MAX( 1, N ) ) THEN
195 CALL XERBLA( 'ZLA_SYRCOND_X', -INFO )
199 IF ( LSAME( UPLO, 'U' ) ) UP = .TRUE.
201 * Compute norm of op(A)*op2(C).
208 TMP = TMP + CABS1( A( J, I ) * X( J ) )
211 TMP = TMP + CABS1( A( I, J ) * X( J ) )
214 ANORM = MAX( ANORM, TMP )
220 TMP = TMP + CABS1( A( I, J ) * X( J ) )
223 TMP = TMP + CABS1( A( J, I ) * X( J ) )
226 ANORM = MAX( ANORM, TMP )
230 * Quick return if possible.
233 ZLA_SYRCOND_X = 1.0D+0
235 ELSE IF( ANORM .EQ. 0.0D+0 ) THEN
239 * Estimate the norm of inv(op(A)).
245 CALL ZLACN2( N, WORK( N+1 ), WORK, AINVNM, KASE, ISAVE )
252 WORK( I ) = WORK( I ) * RWORK( I )
256 CALL ZSYTRS( 'U', N, 1, AF, LDAF, IPIV,
259 CALL ZSYTRS( 'L', N, 1, AF, LDAF, IPIV,
263 * Multiply by inv(X).
266 WORK( I ) = WORK( I ) / X( I )
270 * Multiply by inv(X**T).
273 WORK( I ) = WORK( I ) / X( I )
277 CALL ZSYTRS( 'U', N, 1, AF, LDAF, IPIV,
280 CALL ZSYTRS( 'L', N, 1, AF, LDAF, IPIV,
287 WORK( I ) = WORK( I ) * RWORK( I )
293 * Compute the estimate of the reciprocal condition number.
295 IF( AINVNM .NE. 0.0D+0 )
296 $ ZLA_SYRCOND_X = 1.0D+0 / AINVNM