LAPACK  3.8.0
LAPACK: Linear Algebra PACKage

◆ zppcon()

subroutine zppcon ( character  UPLO,
integer  N,
complex*16, dimension( * )  AP,
double precision  ANORM,
double precision  RCOND,
complex*16, dimension( * )  WORK,
double precision, dimension( * )  RWORK,
integer  INFO 
)

ZPPCON

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

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

 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 triangle of A is stored;
          = 'L':  Lower triangle of A is stored.
[in]N
          N is INTEGER
          The order of the matrix A.  N >= 0.
[in]AP
          AP is COMPLEX*16 array, dimension (N*(N+1)/2)
          The triangular factor U or L from the Cholesky factorization
          A = U**H*U or A = L*L**H, packed columnwise in a linear
          array.  The j-th column of U or L is stored in the array AP
          as follows:
          if UPLO = 'U', AP(i + (j-1)*j/2) = U(i,j) for 1<=i<=j;
          if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = L(i,j) for j<=i<=n.
[in]ANORM
          ANORM is DOUBLE PRECISION
          The 1-norm (or infinity-norm) of the Hermitian 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 120 of file zppcon.f.

120 *
121 * -- LAPACK computational routine (version 3.7.0) --
122 * -- LAPACK is a software package provided by Univ. of Tennessee, --
123 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
124 * December 2016
125 *
126 * .. Scalar Arguments ..
127  CHARACTER uplo
128  INTEGER info, n
129  DOUBLE PRECISION anorm, rcond
130 * ..
131 * .. Array Arguments ..
132  DOUBLE PRECISION rwork( * )
133  COMPLEX*16 ap( * ), work( * )
134 * ..
135 *
136 * =====================================================================
137 *
138 * .. Parameters ..
139  DOUBLE PRECISION one, zero
140  parameter( one = 1.0d+0, zero = 0.0d+0 )
141 * ..
142 * .. Local Scalars ..
143  LOGICAL upper
144  CHARACTER normin
145  INTEGER ix, kase
146  DOUBLE PRECISION ainvnm, scale, scalel, scaleu, smlnum
147  COMPLEX*16 zdum
148 * ..
149 * .. Local Arrays ..
150  INTEGER isave( 3 )
151 * ..
152 * .. External Functions ..
153  LOGICAL lsame
154  INTEGER izamax
155  DOUBLE PRECISION dlamch
156  EXTERNAL lsame, izamax, dlamch
157 * ..
158 * .. External Subroutines ..
159  EXTERNAL xerbla, zdrscl, zlacn2, zlatps
160 * ..
161 * .. Intrinsic Functions ..
162  INTRINSIC abs, dble, dimag
163 * ..
164 * .. Statement Functions ..
165  DOUBLE PRECISION cabs1
166 * ..
167 * .. Statement Function definitions ..
168  cabs1( zdum ) = abs( dble( zdum ) ) + abs( dimag( zdum ) )
169 * ..
170 * .. Executable Statements ..
171 *
172 * Test the input parameters.
173 *
174  info = 0
175  upper = lsame( uplo, 'U' )
176  IF( .NOT.upper .AND. .NOT.lsame( uplo, 'L' ) ) THEN
177  info = -1
178  ELSE IF( n.LT.0 ) THEN
179  info = -2
180  ELSE IF( anorm.LT.zero ) THEN
181  info = -4
182  END IF
183  IF( info.NE.0 ) THEN
184  CALL xerbla( 'ZPPCON', -info )
185  RETURN
186  END IF
187 *
188 * Quick return if possible
189 *
190  rcond = zero
191  IF( n.EQ.0 ) THEN
192  rcond = one
193  RETURN
194  ELSE IF( anorm.EQ.zero ) THEN
195  RETURN
196  END IF
197 *
198  smlnum = dlamch( 'Safe minimum' )
199 *
200 * Estimate the 1-norm of the inverse.
201 *
202  kase = 0
203  normin = 'N'
204  10 CONTINUE
205  CALL zlacn2( n, work( n+1 ), work, ainvnm, kase, isave )
206  IF( kase.NE.0 ) THEN
207  IF( upper ) THEN
208 *
209 * Multiply by inv(U**H).
210 *
211  CALL zlatps( 'Upper', 'Conjugate transpose', 'Non-unit',
212  $ normin, n, ap, work, scalel, rwork, info )
213  normin = 'Y'
214 *
215 * Multiply by inv(U).
216 *
217  CALL zlatps( 'Upper', 'No transpose', 'Non-unit', normin, n,
218  $ ap, work, scaleu, rwork, info )
219  ELSE
220 *
221 * Multiply by inv(L).
222 *
223  CALL zlatps( 'Lower', 'No transpose', 'Non-unit', normin, n,
224  $ ap, work, scalel, rwork, info )
225  normin = 'Y'
226 *
227 * Multiply by inv(L**H).
228 *
229  CALL zlatps( 'Lower', 'Conjugate transpose', 'Non-unit',
230  $ normin, n, ap, work, scaleu, rwork, info )
231  END IF
232 *
233 * Multiply by 1/SCALE if doing so will not cause overflow.
234 *
235  scale = scalel*scaleu
236  IF( scale.NE.one ) THEN
237  ix = izamax( n, work, 1 )
238  IF( scale.LT.cabs1( work( ix ) )*smlnum .OR. scale.EQ.zero )
239  $ GO TO 20
240  CALL zdrscl( n, scale, work, 1 )
241  END IF
242  GO TO 10
243  END IF
244 *
245 * Compute the estimate of the reciprocal condition number.
246 *
247  IF( ainvnm.NE.zero )
248  $ rcond = ( one / ainvnm ) / anorm
249 *
250  20 CONTINUE
251  RETURN
252 *
253 * End of ZPPCON
254 *
double precision function dlamch(CMACH)
DLAMCH
Definition: dlamch.f:65
subroutine zlatps(UPLO, TRANS, DIAG, NORMIN, N, AP, X, SCALE, CNORM, INFO)
ZLATPS solves a triangular system of equations with the matrix held in packed storage.
Definition: zlatps.f:233
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
Here is the call graph for this function:
Here is the caller graph for this function: