 LAPACK  3.9.1 LAPACK: Linear Algebra PACKage

## ◆ cla_gbrcond_x()

 real function cla_gbrcond_x ( character TRANS, integer N, integer KL, integer KU, complex, dimension( ldab, * ) AB, integer LDAB, complex, dimension( ldafb, * ) AFB, integer LDAFB, integer, dimension( * ) IPIV, complex, dimension( * ) X, integer INFO, complex, dimension( * ) WORK, real, dimension( * ) RWORK )

CLA_GBRCOND_X computes the infinity norm condition number of op(A)*diag(x) for general banded matrices.

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

Purpose:
```    CLA_GBRCOND_X Computes the infinity norm condition number of
op(A) * diag(X) where X is a COMPLEX vector.```
Parameters
 [in] TRANS ``` TRANS is CHARACTER*1 Specifies the form of the system of equations: = 'N': A * X = B (No transpose) = 'T': A**T * X = B (Transpose) = 'C': A**H * X = B (Conjugate Transpose = Transpose)``` [in] N ``` N is INTEGER The number of linear equations, i.e., the order of the matrix A. N >= 0.``` [in] KL ``` KL is INTEGER The number of subdiagonals within the band of A. KL >= 0.``` [in] KU ``` KU is INTEGER The number of superdiagonals within the band of A. KU >= 0.``` [in] AB ``` AB is COMPLEX array, dimension (LDAB,N) On entry, the matrix A in band storage, in rows 1 to KL+KU+1. The j-th column of A is stored in the j-th column of the array AB as follows: AB(KU+1+i-j,j) = A(i,j) for max(1,j-KU)<=i<=min(N,j+kl)``` [in] LDAB ``` LDAB is INTEGER The leading dimension of the array AB. LDAB >= KL+KU+1.``` [in] AFB ``` AFB is COMPLEX array, dimension (LDAFB,N) Details of the LU factorization of the band matrix A, as computed by CGBTRF. U is stored as an upper triangular band matrix with KL+KU superdiagonals in rows 1 to KL+KU+1, and the multipliers used during the factorization are stored in rows KL+KU+2 to 2*KL+KU+1.``` [in] LDAFB ``` LDAFB is INTEGER The leading dimension of the array AFB. LDAFB >= 2*KL+KU+1.``` [in] IPIV ``` IPIV is INTEGER array, dimension (N) The pivot indices from the factorization A = P*L*U as computed by CGBTRF; row i of the matrix was interchanged with row IPIV(i).``` [in] X ``` X is COMPLEX array, dimension (N) The vector X in the formula op(A) * diag(X).``` [out] INFO ``` INFO is INTEGER = 0: Successful exit. i > 0: The ith argument is invalid.``` [out] WORK ``` WORK is COMPLEX array, dimension (2*N). Workspace.``` [out] RWORK ``` RWORK is REAL array, dimension (N). Workspace.```

Definition at line 151 of file cla_gbrcond_x.f.

153 *
154 * -- LAPACK computational routine --
155 * -- LAPACK is a software package provided by Univ. of Tennessee, --
156 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
157 *
158 * .. Scalar Arguments ..
159  CHARACTER TRANS
160  INTEGER N, KL, KU, KD, KE, LDAB, LDAFB, INFO
161 * ..
162 * .. Array Arguments ..
163  INTEGER IPIV( * )
164  COMPLEX AB( LDAB, * ), AFB( LDAFB, * ), WORK( * ),
165  \$ X( * )
166  REAL RWORK( * )
167 * ..
168 *
169 * =====================================================================
170 *
171 * .. Local Scalars ..
172  LOGICAL NOTRANS
173  INTEGER KASE, I, J
174  REAL AINVNM, ANORM, TMP
175  COMPLEX ZDUM
176 * ..
177 * .. Local Arrays ..
178  INTEGER ISAVE( 3 )
179 * ..
180 * .. External Functions ..
181  LOGICAL LSAME
182  EXTERNAL lsame
183 * ..
184 * .. External Subroutines ..
185  EXTERNAL clacn2, cgbtrs, xerbla
186 * ..
187 * .. Intrinsic Functions ..
188  INTRINSIC abs, max
189 * ..
190 * .. Statement Functions ..
191  REAL CABS1
192 * ..
193 * .. Statement Function Definitions ..
194  cabs1( zdum ) = abs( real( zdum ) ) + abs( aimag( zdum ) )
195 * ..
196 * .. Executable Statements ..
197 *
198  cla_gbrcond_x = 0.0e+0
199 *
200  info = 0
201  notrans = lsame( trans, 'N' )
202  IF ( .NOT. notrans .AND. .NOT. lsame(trans, 'T') .AND. .NOT.
203  \$ lsame( trans, 'C' ) ) THEN
204  info = -1
205  ELSE IF( n.LT.0 ) THEN
206  info = -2
207  ELSE IF( kl.LT.0 .OR. kl.GT.n-1 ) THEN
208  info = -3
209  ELSE IF( ku.LT.0 .OR. ku.GT.n-1 ) THEN
210  info = -4
211  ELSE IF( ldab.LT.kl+ku+1 ) THEN
212  info = -6
213  ELSE IF( ldafb.LT.2*kl+ku+1 ) THEN
214  info = -8
215  END IF
216  IF( info.NE.0 ) THEN
217  CALL xerbla( 'CLA_GBRCOND_X', -info )
218  RETURN
219  END IF
220 *
221 * Compute norm of op(A)*op2(C).
222 *
223  kd = ku + 1
224  ke = kl + 1
225  anorm = 0.0
226  IF ( notrans ) THEN
227  DO i = 1, n
228  tmp = 0.0e+0
229  DO j = max( i-kl, 1 ), min( i+ku, n )
230  tmp = tmp + cabs1( ab( kd+i-j, j) * x( j ) )
231  END DO
232  rwork( i ) = tmp
233  anorm = max( anorm, tmp )
234  END DO
235  ELSE
236  DO i = 1, n
237  tmp = 0.0e+0
238  DO j = max( i-kl, 1 ), min( i+ku, n )
239  tmp = tmp + cabs1( ab( ke-i+j, i ) * x( j ) )
240  END DO
241  rwork( i ) = tmp
242  anorm = max( anorm, tmp )
243  END DO
244  END IF
245 *
246 * Quick return if possible.
247 *
248  IF( n.EQ.0 ) THEN
249  cla_gbrcond_x = 1.0e+0
250  RETURN
251  ELSE IF( anorm .EQ. 0.0e+0 ) THEN
252  RETURN
253  END IF
254 *
255 * Estimate the norm of inv(op(A)).
256 *
257  ainvnm = 0.0e+0
258 *
259  kase = 0
260  10 CONTINUE
261  CALL clacn2( n, work( n+1 ), work, ainvnm, kase, isave )
262  IF( kase.NE.0 ) THEN
263  IF( kase.EQ.2 ) THEN
264 *
265 * Multiply by R.
266 *
267  DO i = 1, n
268  work( i ) = work( i ) * rwork( i )
269  END DO
270 *
271  IF ( notrans ) THEN
272  CALL cgbtrs( 'No transpose', n, kl, ku, 1, afb, ldafb,
273  \$ ipiv, work, n, info )
274  ELSE
275  CALL cgbtrs( 'Conjugate transpose', n, kl, ku, 1, afb,
276  \$ ldafb, ipiv, work, n, info )
277  ENDIF
278 *
279 * Multiply by inv(X).
280 *
281  DO i = 1, n
282  work( i ) = work( i ) / x( i )
283  END DO
284  ELSE
285 *
286 * Multiply by inv(X**H).
287 *
288  DO i = 1, n
289  work( i ) = work( i ) / x( i )
290  END DO
291 *
292  IF ( notrans ) THEN
293  CALL cgbtrs( 'Conjugate transpose', n, kl, ku, 1, afb,
294  \$ ldafb, ipiv, work, n, info )
295  ELSE
296  CALL cgbtrs( 'No transpose', n, kl, ku, 1, afb, ldafb,
297  \$ ipiv, work, n, info )
298  END IF
299 *
300 * Multiply by R.
301 *
302  DO i = 1, n
303  work( i ) = work( i ) * rwork( i )
304  END DO
305  END IF
306  GO TO 10
307  END IF
308 *
309 * Compute the estimate of the reciprocal condition number.
310 *
311  IF( ainvnm .NE. 0.0e+0 )
312  \$ cla_gbrcond_x = 1.0e+0 / ainvnm
313 *
314  RETURN
315 *
subroutine xerbla(SRNAME, INFO)
XERBLA
Definition: xerbla.f:60
logical function lsame(CA, CB)
LSAME
Definition: lsame.f:53
subroutine cgbtrs(TRANS, N, KL, KU, NRHS, AB, LDAB, IPIV, B, LDB, INFO)
CGBTRS
Definition: cgbtrs.f:138
real function cla_gbrcond_x(TRANS, N, KL, KU, AB, LDAB, AFB, LDAFB, IPIV, X, INFO, WORK, RWORK)
CLA_GBRCOND_X computes the infinity norm condition number of op(A)*diag(x) for general banded matrice...
subroutine clacn2(N, V, X, EST, KASE, ISAVE)
CLACN2 estimates the 1-norm of a square matrix, using reverse communication for evaluating matrix-vec...
Definition: clacn2.f:133
Here is the call graph for this function:
Here is the caller graph for this function: