LAPACK  3.6.1
LAPACK: Linear Algebra PACKage
subroutine zgtcon ( character  NORM,
integer  N,
complex*16, dimension( * )  DL,
complex*16, dimension( * )  D,
complex*16, dimension( * )  DU,
complex*16, dimension( * )  DU2,
integer, dimension( * )  IPIV,
double precision  ANORM,
double precision  RCOND,
complex*16, dimension( * )  WORK,
integer  INFO 
)

ZGTCON

Download ZGTCON + dependencies [TGZ] [ZIP] [TXT]

Purpose:
 ZGTCON estimates the reciprocal of the condition number of a complex
 tridiagonal matrix A using the LU factorization as computed by
 ZGTTRF.

 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 COMPLEX*16 array, dimension (N-1)
          The (n-1) multipliers that define the matrix L from the
          LU factorization of A as computed by ZGTTRF.
[in]D
          D is COMPLEX*16 array, dimension (N)
          The n diagonal elements of the upper triangular matrix U from
          the LU factorization of A.
[in]DU
          DU is COMPLEX*16 array, dimension (N-1)
          The (n-1) elements of the first superdiagonal of U.
[in]DU2
          DU2 is COMPLEX*16 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 COMPLEX*16 array, dimension (2*N)
[out]INFO
          INFO is INTEGER
          = 0:  successful exit
          < 0:  if INFO = -i, the i-th argument had an illegal value
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Date
September 2012

Definition at line 143 of file zgtcon.f.

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

Here is the call graph for this function:

Here is the caller graph for this function: