 LAPACK  3.8.0 LAPACK: Linear Algebra PACKage

◆ dgtcon()

 subroutine dgtcon ( character NORM, integer N, double precision, dimension( * ) DL, double precision, dimension( * ) D, double precision, dimension( * ) DU, double precision, dimension( * ) DU2, integer, dimension( * ) IPIV, double precision ANORM, double precision RCOND, double precision, dimension( * ) WORK, integer, dimension( * ) IWORK, integer INFO )

DGTCON

Purpose:
``` DGTCON estimates the reciprocal of the condition number of a real
tridiagonal matrix A using the LU factorization as computed by
DGTTRF.

An estimate is obtained for norm(inv(A)), and the reciprocal of the
condition number is computed as RCOND = 1 / (ANORM * norm(inv(A))).```
Parameters
 [in] NORM ``` NORM is CHARACTER*1 Specifies whether the 1-norm condition number or the infinity-norm condition number is required: = '1' or 'O': 1-norm; = 'I': Infinity-norm.``` [in] N ``` N is INTEGER The order of the matrix A. N >= 0.``` [in] DL ``` DL is DOUBLE PRECISION array, dimension (N-1) The (n-1) multipliers that define the matrix L from the LU factorization of A as computed by DGTTRF.``` [in] D ``` D is DOUBLE PRECISION array, dimension (N) The n diagonal elements of the upper triangular matrix U from the LU factorization of A.``` [in] DU ``` DU is DOUBLE PRECISION array, dimension (N-1) The (n-1) elements of the first superdiagonal of U.``` [in] DU2 ``` DU2 is DOUBLE PRECISION array, dimension (N-2) The (n-2) elements of the second superdiagonal of U.``` [in] IPIV ``` IPIV is INTEGER array, dimension (N) The pivot indices; for 1 <= i <= n, row i of the matrix was interchanged with row IPIV(i). IPIV(i) will always be either i or i+1; IPIV(i) = i indicates a row interchange was not required.``` [in] ANORM ``` ANORM is DOUBLE PRECISION If NORM = '1' or 'O', the 1-norm of the original matrix A. If NORM = 'I', the infinity-norm of the original matrix A.``` [out] RCOND ``` RCOND is DOUBLE PRECISION The reciprocal of the condition number of the matrix A, computed as RCOND = 1/(ANORM * AINVNM), where AINVNM is an estimate of the 1-norm of inv(A) computed in this routine.``` [out] WORK ` WORK is DOUBLE PRECISION array, dimension (2*N)` [out] IWORK ` IWORK is INTEGER array, dimension (N)` [out] INFO ``` INFO is INTEGER = 0: successful exit < 0: if INFO = -i, the i-th argument had an illegal value```
Date
December 2016

Definition at line 148 of file dgtcon.f.

148 *
149 * -- LAPACK computational routine (version 3.7.0) --
150 * -- LAPACK is a software package provided by Univ. of Tennessee, --
151 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
152 * December 2016
153 *
154 * .. Scalar Arguments ..
155  CHARACTER norm
156  INTEGER info, n
157  DOUBLE PRECISION anorm, rcond
158 * ..
159 * .. Array Arguments ..
160  INTEGER ipiv( * ), iwork( * )
161  DOUBLE PRECISION d( * ), dl( * ), du( * ), du2( * ), work( * )
162 * ..
163 *
164 * =====================================================================
165 *
166 * .. Parameters ..
167  DOUBLE PRECISION one, zero
168  parameter( one = 1.0d+0, zero = 0.0d+0 )
169 * ..
170 * .. Local Scalars ..
171  LOGICAL onenrm
172  INTEGER i, kase, kase1
173  DOUBLE PRECISION ainvnm
174 * ..
175 * .. Local Arrays ..
176  INTEGER isave( 3 )
177 * ..
178 * .. External Functions ..
179  LOGICAL lsame
180  EXTERNAL lsame
181 * ..
182 * .. External Subroutines ..
183  EXTERNAL dgttrs, dlacn2, xerbla
184 * ..
185 * .. Executable Statements ..
186 *
187 * Test the input arguments.
188 *
189  info = 0
190  onenrm = norm.EQ.'1' .OR. lsame( norm, 'O' )
191  IF( .NOT.onenrm .AND. .NOT.lsame( norm, 'I' ) ) THEN
192  info = -1
193  ELSE IF( n.LT.0 ) THEN
194  info = -2
195  ELSE IF( anorm.LT.zero ) THEN
196  info = -8
197  END IF
198  IF( info.NE.0 ) THEN
199  CALL xerbla( 'DGTCON', -info )
200  RETURN
201  END IF
202 *
203 * Quick return if possible
204 *
205  rcond = zero
206  IF( n.EQ.0 ) THEN
207  rcond = one
208  RETURN
209  ELSE IF( anorm.EQ.zero ) THEN
210  RETURN
211  END IF
212 *
213 * Check that D(1:N) is non-zero.
214 *
215  DO 10 i = 1, n
216  IF( d( i ).EQ.zero )
217  \$ RETURN
218  10 CONTINUE
219 *
220  ainvnm = zero
221  IF( onenrm ) THEN
222  kase1 = 1
223  ELSE
224  kase1 = 2
225  END IF
226  kase = 0
227  20 CONTINUE
228  CALL dlacn2( n, work( n+1 ), work, iwork, ainvnm, kase, isave )
229  IF( kase.NE.0 ) THEN
230  IF( kase.EQ.kase1 ) THEN
231 *
232 * Multiply by inv(U)*inv(L).
233 *
234  CALL dgttrs( 'No transpose', n, 1, dl, d, du, du2, ipiv,
235  \$ work, n, info )
236  ELSE
237 *
238 * Multiply by inv(L**T)*inv(U**T).
239 *
240  CALL dgttrs( 'Transpose', n, 1, dl, d, du, du2, ipiv, work,
241  \$ n, info )
242  END IF
243  GO TO 20
244  END IF
245 *
246 * Compute the estimate of the reciprocal condition number.
247 *
248  IF( ainvnm.NE.zero )
249  \$ rcond = ( one / ainvnm ) / anorm
250 *
251  RETURN
252 *
253 * End of DGTCON
254 *
subroutine dlacn2(N, V, X, ISGN, EST, KASE, ISAVE)
DLACN2 estimates the 1-norm of a square matrix, using reverse communication for evaluating matrix-vec...
Definition: dlacn2.f:138
subroutine xerbla(SRNAME, INFO)
XERBLA
Definition: xerbla.f:62
logical function lsame(CA, CB)
LSAME
Definition: lsame.f:55
subroutine dgttrs(TRANS, N, NRHS, DL, D, DU, DU2, IPIV, B, LDB, INFO)
DGTTRS
Definition: dgttrs.f:140
Here is the call graph for this function:
Here is the caller graph for this function: