3 * =========== DOCUMENTATION ===========
5 * Online html documentation available at
6 * http://www.netlib.org/lapack/explore-html/
9 *> Download SSPCON + dependencies
10 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/sspcon.f">
12 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/sspcon.f">
14 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/sspcon.f">
21 * SUBROUTINE SSPCON( UPLO, N, AP, IPIV, ANORM, RCOND, WORK, IWORK,
24 * .. Scalar Arguments ..
29 * .. Array Arguments ..
30 * INTEGER IPIV( * ), IWORK( * )
31 * REAL AP( * ), WORK( * )
40 *> SSPCON estimates the reciprocal of the condition number (in the
41 *> 1-norm) of a real symmetric packed matrix A using the factorization
42 *> A = U*D*U**T or A = L*D*L**T computed by SSPTRF.
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 *> AP is REAL array, dimension (N*(N+1)/2)
69 *> The block diagonal matrix D and the multipliers used to
70 *> obtain the factor U or L as computed by SSPTRF, stored as a
71 *> packed triangular matrix.
76 *> IPIV is INTEGER array, dimension (N)
77 *> Details of the interchanges and the block structure of D
78 *> as determined by SSPTRF.
84 *> The 1-norm of the original matrix A.
90 *> The reciprocal of the condition number of the matrix A,
91 *> computed as RCOND = 1/(ANORM * AINVNM), where AINVNM is an
92 *> estimate of the 1-norm of inv(A) computed in this routine.
97 *> WORK is REAL array, dimension (2*N)
102 *> IWORK is INTEGER array, dimension (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 realOTHERcomputational
124 * =====================================================================
125 SUBROUTINE SSPCON( UPLO, N, AP, IPIV, ANORM, RCOND, WORK, IWORK,
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 ..
139 INTEGER IPIV( * ), IWORK( * )
140 REAL AP( * ), WORK( * )
143 * =====================================================================
147 PARAMETER ( ONE = 1.0E+0, ZERO = 0.0E+0 )
149 * .. Local Scalars ..
157 * .. External Functions ..
161 * .. External Subroutines ..
162 EXTERNAL SLACN2, SSPTRS, XERBLA
164 * .. Executable Statements ..
166 * Test the input parameters.
169 UPPER = LSAME( UPLO, 'U' )
170 IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN
172 ELSE IF( N.LT.0 ) THEN
174 ELSE IF( ANORM.LT.ZERO ) THEN
178 CALL XERBLA( 'SSPCON', -INFO )
182 * Quick return if possible
188 ELSE IF( ANORM.LE.ZERO ) THEN
192 * Check that the diagonal matrix D is nonsingular.
196 * Upper triangular storage: examine D from bottom to top
200 IF( IPIV( I ).GT.0 .AND. AP( IP ).EQ.ZERO )
206 * Lower triangular storage: examine D from top to bottom.
210 IF( IPIV( I ).GT.0 .AND. AP( IP ).EQ.ZERO )
216 * Estimate the 1-norm of the inverse.
220 CALL SLACN2( N, WORK( N+1 ), WORK, IWORK, AINVNM, KASE, ISAVE )
223 * Multiply by inv(L*D*L**T) or inv(U*D*U**T).
225 CALL SSPTRS( UPLO, N, 1, AP, IPIV, WORK, N, INFO )
229 * Compute the estimate of the reciprocal condition number.
232 $ RCOND = ( ONE / AINVNM ) / ANORM