LAPACK  3.6.1
LAPACK: Linear Algebra PACKage
subroutine zspcon ( character  UPLO,
integer  N,
complex*16, dimension( * )  AP,
integer, dimension( * )  IPIV,
double precision  ANORM,
double precision  RCOND,
complex*16, dimension( * )  WORK,
integer  INFO 
)

ZSPCON

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

Purpose:
 ZSPCON estimates the reciprocal of the condition number (in the
 1-norm) of a complex symmetric packed matrix A using the
 factorization A = U*D*U**T or A = L*D*L**T computed by ZSPTRF.

 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
          Specifies whether the details of the factorization are stored
          as an upper or lower triangular matrix.
          = 'U':  Upper triangular, form is A = U*D*U**T;
          = 'L':  Lower triangular, form is A = L*D*L**T.
[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 block diagonal matrix D and the multipliers used to
          obtain the factor U or L as computed by ZSPTRF, stored as a
          packed triangular matrix.
[in]IPIV
          IPIV is INTEGER array, dimension (N)
          Details of the interchanges and the block structure of D
          as determined by ZSPTRF.
[in]ANORM
          ANORM is DOUBLE PRECISION
          The 1-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
November 2011

Definition at line 120 of file zspcon.f.

120 *
121 * -- LAPACK computational routine (version 3.4.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 * November 2011
125 *
126 * .. Scalar Arguments ..
127  CHARACTER uplo
128  INTEGER info, n
129  DOUBLE PRECISION anorm, rcond
130 * ..
131 * .. Array Arguments ..
132  INTEGER ipiv( * )
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  INTEGER i, ip, kase
145  DOUBLE PRECISION ainvnm
146 * ..
147 * .. Local Arrays ..
148  INTEGER isave( 3 )
149 * ..
150 * .. External Functions ..
151  LOGICAL lsame
152  EXTERNAL lsame
153 * ..
154 * .. External Subroutines ..
155  EXTERNAL xerbla, zlacn2, zsptrs
156 * ..
157 * .. Executable Statements ..
158 *
159 * Test the input parameters.
160 *
161  info = 0
162  upper = lsame( uplo, 'U' )
163  IF( .NOT.upper .AND. .NOT.lsame( uplo, 'L' ) ) THEN
164  info = -1
165  ELSE IF( n.LT.0 ) THEN
166  info = -2
167  ELSE IF( anorm.LT.zero ) THEN
168  info = -5
169  END IF
170  IF( info.NE.0 ) THEN
171  CALL xerbla( 'ZSPCON', -info )
172  RETURN
173  END IF
174 *
175 * Quick return if possible
176 *
177  rcond = zero
178  IF( n.EQ.0 ) THEN
179  rcond = one
180  RETURN
181  ELSE IF( anorm.LE.zero ) THEN
182  RETURN
183  END IF
184 *
185 * Check that the diagonal matrix D is nonsingular.
186 *
187  IF( upper ) THEN
188 *
189 * Upper triangular storage: examine D from bottom to top
190 *
191  ip = n*( n+1 ) / 2
192  DO 10 i = n, 1, -1
193  IF( ipiv( i ).GT.0 .AND. ap( ip ).EQ.zero )
194  $ RETURN
195  ip = ip - i
196  10 CONTINUE
197  ELSE
198 *
199 * Lower triangular storage: examine D from top to bottom.
200 *
201  ip = 1
202  DO 20 i = 1, n
203  IF( ipiv( i ).GT.0 .AND. ap( ip ).EQ.zero )
204  $ RETURN
205  ip = ip + n - i + 1
206  20 CONTINUE
207  END IF
208 *
209 * Estimate the 1-norm of the inverse.
210 *
211  kase = 0
212  30 CONTINUE
213  CALL zlacn2( n, work( n+1 ), work, ainvnm, kase, isave )
214  IF( kase.NE.0 ) THEN
215 *
216 * Multiply by inv(L*D*L**T) or inv(U*D*U**T).
217 *
218  CALL zsptrs( uplo, n, 1, ap, ipiv, work, n, info )
219  GO TO 30
220  END IF
221 *
222 * Compute the estimate of the reciprocal condition number.
223 *
224  IF( ainvnm.NE.zero )
225  $ rcond = ( one / ainvnm ) / anorm
226 *
227  RETURN
228 *
229 * End of ZSPCON
230 *
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
subroutine zsptrs(UPLO, N, NRHS, AP, IPIV, B, LDB, INFO)
ZSPTRS
Definition: zsptrs.f:117
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: