3 * =========== DOCUMENTATION ===========
5 * Online html documentation available at
6 * http://www.netlib.org/lapack/explore-html/
9 *> Download ZHPCON + dependencies
10 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zhpcon.f">
12 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zhpcon.f">
14 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zhpcon.f">
21 * SUBROUTINE ZHPCON( UPLO, N, AP, IPIV, ANORM, RCOND, WORK, INFO )
23 * .. Scalar Arguments ..
26 * DOUBLE PRECISION ANORM, RCOND
28 * .. Array Arguments ..
30 * COMPLEX*16 AP( * ), WORK( * )
39 *> ZHPCON estimates the reciprocal of the condition number of a complex
40 *> Hermitian packed matrix A using the factorization A = U*D*U**H or
41 *> A = L*D*L**H computed by ZHPTRF.
43 *> An estimate is obtained for norm(inv(A)), and the reciprocal of the
44 *> condition number is computed as RCOND = 1 / (ANORM * norm(inv(A))).
52 *> UPLO is CHARACTER*1
53 *> Specifies whether the details of the factorization are stored
54 *> as an upper or lower triangular matrix.
55 *> = 'U': Upper triangular, form is A = U*D*U**H;
56 *> = 'L': Lower triangular, form is A = L*D*L**H.
62 *> The order of the matrix A. N >= 0.
67 *> AP is COMPLEX*16 array, dimension (N*(N+1)/2)
68 *> The block diagonal matrix D and the multipliers used to
69 *> obtain the factor U or L as computed by ZHPTRF, stored as a
70 *> packed triangular matrix.
75 *> IPIV is INTEGER array, dimension (N)
76 *> Details of the interchanges and the block structure of D
77 *> as determined by ZHPTRF.
82 *> ANORM is DOUBLE PRECISION
83 *> The 1-norm of the original matrix A.
88 *> RCOND is DOUBLE PRECISION
89 *> The reciprocal of the condition number of the matrix A,
90 *> computed as RCOND = 1/(ANORM * AINVNM), where AINVNM is an
91 *> estimate of the 1-norm of inv(A) computed in this routine.
96 *> WORK is COMPLEX*16 array, dimension (2*N)
102 *> = 0: successful exit
103 *> < 0: if INFO = -i, the i-th argument had an illegal value
109 *> \author Univ. of Tennessee
110 *> \author Univ. of California Berkeley
111 *> \author Univ. of Colorado Denver
114 *> \date November 2011
116 *> \ingroup complex16OTHERcomputational
118 * =====================================================================
119 SUBROUTINE ZHPCON( UPLO, N, AP, IPIV, ANORM, RCOND, WORK, INFO )
121 * -- LAPACK computational routine (version 3.4.0) --
122 * -- LAPACK is a software package provided by Univ. of Tennessee, --
123 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
126 * .. Scalar Arguments ..
129 DOUBLE PRECISION ANORM, RCOND
131 * .. Array Arguments ..
133 COMPLEX*16 AP( * ), WORK( * )
136 * =====================================================================
139 DOUBLE PRECISION ONE, ZERO
140 PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 )
142 * .. Local Scalars ..
145 DOUBLE PRECISION AINVNM
150 * .. External Functions ..
154 * .. External Subroutines ..
155 EXTERNAL XERBLA, ZHPTRS, ZLACN2
157 * .. Executable Statements ..
159 * Test the input parameters.
162 UPPER = LSAME( UPLO, 'U' )
163 IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN
165 ELSE IF( N.LT.0 ) THEN
167 ELSE IF( ANORM.LT.ZERO ) THEN
171 CALL XERBLA( 'ZHPCON', -INFO )
175 * Quick return if possible
181 ELSE IF( ANORM.LE.ZERO ) THEN
185 * Check that the diagonal matrix D is nonsingular.
189 * Upper triangular storage: examine D from bottom to top
193 IF( IPIV( I ).GT.0 .AND. AP( IP ).EQ.ZERO )
199 * Lower triangular storage: examine D from top to bottom.
203 IF( IPIV( I ).GT.0 .AND. AP( IP ).EQ.ZERO )
209 * Estimate the 1-norm of the inverse.
213 CALL ZLACN2( N, WORK( N+1 ), WORK, AINVNM, KASE, ISAVE )
216 * Multiply by inv(L*D*L**H) or inv(U*D*U**H).
218 CALL ZHPTRS( UPLO, N, 1, AP, IPIV, WORK, N, INFO )
222 * Compute the estimate of the reciprocal condition number.
225 $ RCOND = ( ONE / AINVNM ) / ANORM