1 *> \brief <b> SSYCON_ROOK </b>
3 * =========== DOCUMENTATION ===========
5 * Online html documentation available at
6 * http://www.netlib.org/lapack/explore-html/
9 *> Download SSYCON_ROOK + dependencies
10 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/ssycon_rook.f">
12 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/ssycon_rook.f">
14 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/ssycon_rook.f">
21 * SUBROUTINE SSYCON_ROOK( UPLO, N, A, LDA, IPIV, ANORM, RCOND,
24 * .. Scalar Arguments ..
26 * INTEGER INFO, LDA, N
29 * .. Array Arguments ..
30 * INTEGER IPIV( * ), IWORK( * )
31 * REAL A( LDA, * ), WORK( * )
40 *> SSYCON_ROOK estimates the reciprocal of the condition number (in the
41 *> 1-norm) of a real symmetric matrix A using the factorization
42 *> A = U*D*U**T or A = L*D*L**T computed by SSYTRF_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 REAL 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 SSYTRF_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 SSYTRF_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 REAL array, dimension (2*N)
107 *> IWORK is INTEGER array, dimension (N)
113 *> = 0: successful exit
114 *> < 0: if INFO = -i, the i-th argument had an illegal value
120 *> \author Univ. of Tennessee
121 *> \author Univ. of California Berkeley
122 *> \author Univ. of Colorado Denver
125 *> \date November 2015
127 *> \ingroup realSYcomputational
129 *> \par Contributors:
133 *> November 2015, Igor Kozachenko,
134 *> Computer Science Division,
135 *> University of California, Berkeley
137 *> September 2007, Sven Hammarling, Nicholas J. Higham, Craig Lucas,
138 *> School of Mathematics,
139 *> University of Manchester
143 * =====================================================================
144 SUBROUTINE SSYCON_ROOK( UPLO, N, A, LDA, IPIV, ANORM, RCOND, WORK,
147 * -- LAPACK computational routine (version 3.6.0) --
148 * -- LAPACK is a software package provided by Univ. of Tennessee, --
149 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
152 * .. Scalar Arguments ..
157 * .. Array Arguments ..
158 INTEGER IPIV( * ), IWORK( * )
159 REAL A( LDA, * ), WORK( * )
162 * =====================================================================
166 PARAMETER ( ONE = 1.0E+0, ZERO = 0.0E+0 )
168 * .. Local Scalars ..
176 * .. External Functions ..
180 * .. External Subroutines ..
181 EXTERNAL SLACN2, SSYTRS_ROOK, XERBLA
183 * .. Intrinsic Functions ..
186 * .. Executable Statements ..
188 * Test the input parameters.
191 UPPER = LSAME( UPLO, 'U' )
192 IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN
194 ELSE IF( N.LT.0 ) THEN
196 ELSE IF( LDA.LT.MAX( 1, N ) ) THEN
198 ELSE IF( ANORM.LT.ZERO ) THEN
202 CALL XERBLA( 'SSYCON_ROOK', -INFO )
206 * Quick return if possible
212 ELSE IF( ANORM.LE.ZERO ) THEN
216 * Check that the diagonal matrix D is nonsingular.
220 * Upper triangular storage: examine D from bottom to top
223 IF( IPIV( I ).GT.0 .AND. A( I, I ).EQ.ZERO )
228 * Lower triangular storage: examine D from top to bottom.
231 IF( IPIV( I ).GT.0 .AND. A( I, I ).EQ.ZERO )
236 * Estimate the 1-norm of the inverse.
240 CALL SLACN2( N, WORK( N+1 ), WORK, IWORK, AINVNM, KASE, ISAVE )
243 * Multiply by inv(L*D*L**T) or inv(U*D*U**T).
245 CALL SSYTRS_ROOK( UPLO, N, 1, A, LDA, IPIV, WORK, N, INFO )
249 * Compute the estimate of the reciprocal condition number.
252 $ RCOND = ( ONE / AINVNM ) / ANORM