3 * =========== DOCUMENTATION ===========
5 * Online html documentation available at
6 * http://www.netlib.org/lapack/explore-html/
9 *> Download ZPBCON + dependencies
10 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zpbcon.f">
12 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zpbcon.f">
14 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zpbcon.f">
21 * SUBROUTINE ZPBCON( UPLO, N, KD, AB, LDAB, ANORM, RCOND, WORK,
24 * .. Scalar Arguments ..
26 * INTEGER INFO, KD, LDAB, N
27 * DOUBLE PRECISION ANORM, RCOND
29 * .. Array Arguments ..
30 * DOUBLE PRECISION RWORK( * )
31 * COMPLEX*16 AB( LDAB, * ), WORK( * )
40 *> ZPBCON estimates the reciprocal of the condition number (in the
41 *> 1-norm) of a complex Hermitian positive definite band matrix using
42 *> the Cholesky factorization A = U**H*U or A = L*L**H computed by
45 *> An estimate is obtained for norm(inv(A)), and the reciprocal of the
46 *> condition number is computed as RCOND = 1 / (ANORM * norm(inv(A))).
54 *> UPLO is CHARACTER*1
55 *> = 'U': Upper triangular factor stored in AB;
56 *> = 'L': Lower triangular factor stored in AB.
62 *> The order of the matrix A. N >= 0.
68 *> The number of superdiagonals of the matrix A if UPLO = 'U',
69 *> or the number of sub-diagonals if UPLO = 'L'. KD >= 0.
74 *> AB is COMPLEX*16 array, dimension (LDAB,N)
75 *> The triangular factor U or L from the Cholesky factorization
76 *> A = U**H*U or A = L*L**H of the band matrix A, stored in the
77 *> first KD+1 rows of the array. The j-th column of U or L is
78 *> stored in the j-th column of the array AB as follows:
79 *> if UPLO ='U', AB(kd+1+i-j,j) = U(i,j) for max(1,j-kd)<=i<=j;
80 *> if UPLO ='L', AB(1+i-j,j) = L(i,j) for j<=i<=min(n,j+kd).
86 *> The leading dimension of the array AB. LDAB >= KD+1.
91 *> ANORM is DOUBLE PRECISION
92 *> The 1-norm (or infinity-norm) of the Hermitian band matrix A.
97 *> RCOND is DOUBLE PRECISION
98 *> The reciprocal of the condition number of the matrix A,
99 *> computed as RCOND = 1/(ANORM * AINVNM), where AINVNM is an
100 *> estimate of the 1-norm of inv(A) computed in this routine.
105 *> WORK is COMPLEX*16 array, dimension (2*N)
110 *> RWORK is DOUBLE PRECISION array, dimension (N)
116 *> = 0: successful exit
117 *> < 0: if INFO = -i, the i-th argument had an illegal value
123 *> \author Univ. of Tennessee
124 *> \author Univ. of California Berkeley
125 *> \author Univ. of Colorado Denver
128 *> \date November 2011
130 *> \ingroup complex16OTHERcomputational
132 * =====================================================================
133 SUBROUTINE ZPBCON( UPLO, N, KD, AB, LDAB, ANORM, RCOND, WORK,
136 * -- LAPACK computational routine (version 3.4.0) --
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 INFO, KD, LDAB, N
144 DOUBLE PRECISION ANORM, RCOND
146 * .. Array Arguments ..
147 DOUBLE PRECISION RWORK( * )
148 COMPLEX*16 AB( LDAB, * ), WORK( * )
151 * =====================================================================
154 DOUBLE PRECISION ONE, ZERO
155 PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 )
157 * .. Local Scalars ..
161 DOUBLE PRECISION AINVNM, SCALE, SCALEL, SCALEU, SMLNUM
167 * .. External Functions ..
170 DOUBLE PRECISION DLAMCH
171 EXTERNAL LSAME, IZAMAX, DLAMCH
173 * .. External Subroutines ..
174 EXTERNAL XERBLA, ZDRSCL, ZLACN2, ZLATBS
176 * .. Intrinsic Functions ..
177 INTRINSIC ABS, DBLE, DIMAG
179 * .. Statement Functions ..
180 DOUBLE PRECISION CABS1
182 * .. Statement Function definitions ..
183 CABS1( ZDUM ) = ABS( DBLE( ZDUM ) ) + ABS( DIMAG( ZDUM ) )
185 * .. Executable Statements ..
187 * Test the input parameters.
190 UPPER = LSAME( UPLO, 'U' )
191 IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN
193 ELSE IF( N.LT.0 ) THEN
195 ELSE IF( KD.LT.0 ) THEN
197 ELSE IF( LDAB.LT.KD+1 ) THEN
199 ELSE IF( ANORM.LT.ZERO ) THEN
203 CALL XERBLA( 'ZPBCON', -INFO )
207 * Quick return if possible
213 ELSE IF( ANORM.EQ.ZERO ) THEN
217 SMLNUM = DLAMCH( 'Safe minimum' )
219 * Estimate the 1-norm of the inverse.
224 CALL ZLACN2( N, WORK( N+1 ), WORK, AINVNM, KASE, ISAVE )
228 * Multiply by inv(U**H).
230 CALL ZLATBS( 'Upper', 'Conjugate transpose', 'Non-unit',
231 $ NORMIN, N, KD, AB, LDAB, WORK, SCALEL, RWORK,
235 * Multiply by inv(U).
237 CALL ZLATBS( 'Upper', 'No transpose', 'Non-unit', NORMIN, N,
238 $ KD, AB, LDAB, WORK, SCALEU, RWORK, INFO )
241 * Multiply by inv(L).
243 CALL ZLATBS( 'Lower', 'No transpose', 'Non-unit', NORMIN, N,
244 $ KD, AB, LDAB, WORK, SCALEL, RWORK, INFO )
247 * Multiply by inv(L**H).
249 CALL ZLATBS( 'Lower', 'Conjugate transpose', 'Non-unit',
250 $ NORMIN, N, KD, AB, LDAB, WORK, SCALEU, RWORK,
254 * Multiply by 1/SCALE if doing so will not cause overflow.
256 SCALE = SCALEL*SCALEU
257 IF( SCALE.NE.ONE ) THEN
258 IX = IZAMAX( N, WORK, 1 )
259 IF( SCALE.LT.CABS1( WORK( IX ) )*SMLNUM .OR. SCALE.EQ.ZERO )
261 CALL ZDRSCL( N, SCALE, WORK, 1 )
266 * Compute the estimate of the reciprocal condition number.
269 $ RCOND = ( ONE / AINVNM ) / ANORM