LAPACK  3.8.0
LAPACK: Linear Algebra PACKage

◆ zpbcon()

subroutine zpbcon ( character  UPLO,
integer  N,
integer  KD,
complex*16, dimension( ldab, * )  AB,
integer  LDAB,
double precision  ANORM,
double precision  RCOND,
complex*16, dimension( * )  WORK,
double precision, dimension( * )  RWORK,
integer  INFO 
)

ZPBCON

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

Purpose:
 ZPBCON estimates the reciprocal of the condition number (in the
 1-norm) of a complex Hermitian positive definite band matrix using
 the Cholesky factorization A = U**H*U or A = L*L**H computed by
 ZPBTRF.

 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]UPLO
          UPLO is CHARACTER*1
          = 'U':  Upper triangular factor stored in AB;
          = 'L':  Lower triangular factor stored in AB.
[in]N
          N is INTEGER
          The order of the matrix A.  N >= 0.
[in]KD
          KD is INTEGER
          The number of superdiagonals of the matrix A if UPLO = 'U',
          or the number of sub-diagonals if UPLO = 'L'.  KD >= 0.
[in]AB
          AB is COMPLEX*16 array, dimension (LDAB,N)
          The triangular factor U or L from the Cholesky factorization
          A = U**H*U or A = L*L**H of the band matrix A, stored in the
          first KD+1 rows of the array.  The j-th column of U or L is
          stored in the j-th column of the array AB as follows:
          if UPLO ='U', AB(kd+1+i-j,j) = U(i,j) for max(1,j-kd)<=i<=j;
          if UPLO ='L', AB(1+i-j,j)    = L(i,j) for j<=i<=min(n,j+kd).
[in]LDAB
          LDAB is INTEGER
          The leading dimension of the array AB.  LDAB >= KD+1.
[in]ANORM
          ANORM is DOUBLE PRECISION
          The 1-norm (or infinity-norm) of the Hermitian band 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]RWORK
          RWORK is DOUBLE PRECISION array, dimension (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
December 2016

Definition at line 135 of file zpbcon.f.

135 *
136 * -- LAPACK computational routine (version 3.7.0) --
137 * -- LAPACK is a software package provided by Univ. of Tennessee, --
138 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
139 * December 2016
140 *
141 * .. Scalar Arguments ..
142  CHARACTER uplo
143  INTEGER info, kd, ldab, n
144  DOUBLE PRECISION anorm, rcond
145 * ..
146 * .. Array Arguments ..
147  DOUBLE PRECISION rwork( * )
148  COMPLEX*16 ab( ldab, * ), work( * )
149 * ..
150 *
151 * =====================================================================
152 *
153 * .. Parameters ..
154  DOUBLE PRECISION one, zero
155  parameter( one = 1.0d+0, zero = 0.0d+0 )
156 * ..
157 * .. Local Scalars ..
158  LOGICAL upper
159  CHARACTER normin
160  INTEGER ix, kase
161  DOUBLE PRECISION ainvnm, scale, scalel, scaleu, smlnum
162  COMPLEX*16 zdum
163 * ..
164 * .. Local Arrays ..
165  INTEGER isave( 3 )
166 * ..
167 * .. External Functions ..
168  LOGICAL lsame
169  INTEGER izamax
170  DOUBLE PRECISION dlamch
171  EXTERNAL lsame, izamax, dlamch
172 * ..
173 * .. External Subroutines ..
174  EXTERNAL xerbla, zdrscl, zlacn2, zlatbs
175 * ..
176 * .. Intrinsic Functions ..
177  INTRINSIC abs, dble, dimag
178 * ..
179 * .. Statement Functions ..
180  DOUBLE PRECISION cabs1
181 * ..
182 * .. Statement Function definitions ..
183  cabs1( zdum ) = abs( dble( zdum ) ) + abs( dimag( zdum ) )
184 * ..
185 * .. Executable Statements ..
186 *
187 * Test the input parameters.
188 *
189  info = 0
190  upper = lsame( uplo, 'U' )
191  IF( .NOT.upper .AND. .NOT.lsame( uplo, 'L' ) ) THEN
192  info = -1
193  ELSE IF( n.LT.0 ) THEN
194  info = -2
195  ELSE IF( kd.LT.0 ) THEN
196  info = -3
197  ELSE IF( ldab.LT.kd+1 ) THEN
198  info = -5
199  ELSE IF( anorm.LT.zero ) THEN
200  info = -6
201  END IF
202  IF( info.NE.0 ) THEN
203  CALL xerbla( 'ZPBCON', -info )
204  RETURN
205  END IF
206 *
207 * Quick return if possible
208 *
209  rcond = zero
210  IF( n.EQ.0 ) THEN
211  rcond = one
212  RETURN
213  ELSE IF( anorm.EQ.zero ) THEN
214  RETURN
215  END IF
216 *
217  smlnum = dlamch( 'Safe minimum' )
218 *
219 * Estimate the 1-norm of the inverse.
220 *
221  kase = 0
222  normin = 'N'
223  10 CONTINUE
224  CALL zlacn2( n, work( n+1 ), work, ainvnm, kase, isave )
225  IF( kase.NE.0 ) THEN
226  IF( upper ) THEN
227 *
228 * Multiply by inv(U**H).
229 *
230  CALL zlatbs( 'Upper', 'Conjugate transpose', 'Non-unit',
231  $ normin, n, kd, ab, ldab, work, scalel, rwork,
232  $ info )
233  normin = 'Y'
234 *
235 * Multiply by inv(U).
236 *
237  CALL zlatbs( 'Upper', 'No transpose', 'Non-unit', normin, n,
238  $ kd, ab, ldab, work, scaleu, rwork, info )
239  ELSE
240 *
241 * Multiply by inv(L).
242 *
243  CALL zlatbs( 'Lower', 'No transpose', 'Non-unit', normin, n,
244  $ kd, ab, ldab, work, scalel, rwork, info )
245  normin = 'Y'
246 *
247 * Multiply by inv(L**H).
248 *
249  CALL zlatbs( 'Lower', 'Conjugate transpose', 'Non-unit',
250  $ normin, n, kd, ab, ldab, work, scaleu, rwork,
251  $ info )
252  END IF
253 *
254 * Multiply by 1/SCALE if doing so will not cause overflow.
255 *
256  scale = scalel*scaleu
257  IF( scale.NE.one ) THEN
258  ix = izamax( n, work, 1 )
259  IF( scale.LT.cabs1( work( ix ) )*smlnum .OR. scale.EQ.zero )
260  $ GO TO 20
261  CALL zdrscl( n, scale, work, 1 )
262  END IF
263  GO TO 10
264  END IF
265 *
266 * Compute the estimate of the reciprocal condition number.
267 *
268  IF( ainvnm.NE.zero )
269  $ rcond = ( one / ainvnm ) / anorm
270 *
271  20 CONTINUE
272 *
273  RETURN
274 *
275 * End of ZPBCON
276 *
double precision function dlamch(CMACH)
DLAMCH
Definition: dlamch.f:65
integer function izamax(N, ZX, INCX)
IZAMAX
Definition: izamax.f:73
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
subroutine zdrscl(N, SA, SX, INCX)
ZDRSCL multiplies a vector by the reciprocal of a real scalar.
Definition: zdrscl.f:86
subroutine xerbla(SRNAME, INFO)
XERBLA
Definition: xerbla.f:62
logical function lsame(CA, CB)
LSAME
Definition: lsame.f:55
subroutine zlatbs(UPLO, TRANS, DIAG, NORMIN, N, KD, AB, LDAB, X, SCALE, CNORM, INFO)
ZLATBS solves a triangular banded system of equations.
Definition: zlatbs.f:245
Here is the call graph for this function:
Here is the caller graph for this function: