LAPACK  3.8.0 LAPACK: Linear Algebra PACKage

## ◆ zlangt()

 double precision function zlangt ( character NORM, integer N, complex*16, dimension( * ) DL, complex*16, dimension( * ) D, complex*16, dimension( * ) DU )

ZLANGT returns the value of the 1-norm, Frobenius norm, infinity-norm, or the largest absolute value of any element of a general tridiagonal matrix.

Purpose:
``` ZLANGT  returns the value of the one norm,  or the Frobenius norm, or
the  infinity norm,  or the  element of  largest absolute value  of a
complex tridiagonal matrix A.```
Returns
ZLANGT
```    ZLANGT = ( max(abs(A(i,j))), NORM = 'M' or 'm'
(
( norm1(A),         NORM = '1', 'O' or 'o'
(
( normI(A),         NORM = 'I' or 'i'
(
( normF(A),         NORM = 'F', 'f', 'E' or 'e'

where  norm1  denotes the  one norm of a matrix (maximum column sum),
normI  denotes the  infinity norm  of a matrix  (maximum row sum) and
normF  denotes the  Frobenius norm of a matrix (square root of sum of
squares).  Note that  max(abs(A(i,j)))  is not a consistent matrix norm.```
Parameters
 [in] NORM ``` NORM is CHARACTER*1 Specifies the value to be returned in ZLANGT as described above.``` [in] N ``` N is INTEGER The order of the matrix A. N >= 0. When N = 0, ZLANGT is set to zero.``` [in] DL ``` DL is COMPLEX*16 array, dimension (N-1) The (n-1) sub-diagonal elements of A.``` [in] D ``` D is COMPLEX*16 array, dimension (N) The diagonal elements of A.``` [in] DU ``` DU is COMPLEX*16 array, dimension (N-1) The (n-1) super-diagonal elements of A.```
Date
December 2016

Definition at line 108 of file zlangt.f.

108 *
109 * -- LAPACK auxiliary routine (version 3.7.0) --
110 * -- LAPACK is a software package provided by Univ. of Tennessee, --
111 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
112 * December 2016
113 *
114 * .. Scalar Arguments ..
115  CHARACTER norm
116  INTEGER n
117 * ..
118 * .. Array Arguments ..
119  COMPLEX*16 d( * ), dl( * ), du( * )
120 * ..
121 *
122 * =====================================================================
123 *
124 * .. Parameters ..
125  DOUBLE PRECISION one, zero
126  parameter( one = 1.0d+0, zero = 0.0d+0 )
127 * ..
128 * .. Local Scalars ..
129  INTEGER i
130  DOUBLE PRECISION anorm, scale, sum, temp
131 * ..
132 * .. External Functions ..
133  LOGICAL lsame, disnan
134  EXTERNAL lsame, disnan
135 * ..
136 * .. External Subroutines ..
137  EXTERNAL zlassq
138 * ..
139 * .. Intrinsic Functions ..
140  INTRINSIC abs, sqrt
141 * ..
142 * .. Executable Statements ..
143 *
144  IF( n.LE.0 ) THEN
145  anorm = zero
146  ELSE IF( lsame( norm, 'M' ) ) THEN
147 *
148 * Find max(abs(A(i,j))).
149 *
150  anorm = abs( d( n ) )
151  DO 10 i = 1, n - 1
152  IF( anorm.LT.abs( dl( i ) ) .OR. disnan( abs( dl( i ) ) ) )
153  \$ anorm = abs(dl(i))
154  IF( anorm.LT.abs( d( i ) ) .OR. disnan( abs( d( i ) ) ) )
155  \$ anorm = abs(d(i))
156  IF( anorm.LT.abs( du( i ) ) .OR. disnan(abs( du( i ) ) ) )
157  \$ anorm = abs(du(i))
158  10 CONTINUE
159  ELSE IF( lsame( norm, 'O' ) .OR. norm.EQ.'1' ) THEN
160 *
161 * Find norm1(A).
162 *
163  IF( n.EQ.1 ) THEN
164  anorm = abs( d( 1 ) )
165  ELSE
166  anorm = abs( d( 1 ) )+abs( dl( 1 ) )
167  temp = abs( d( n ) )+abs( du( n-1 ) )
168  IF( anorm .LT. temp .OR. disnan( temp ) ) anorm = temp
169  DO 20 i = 2, n - 1
170  temp = abs( d( i ) )+abs( dl( i ) )+abs( du( i-1 ) )
171  IF( anorm .LT. temp .OR. disnan( temp ) ) anorm = temp
172  20 CONTINUE
173  END IF
174  ELSE IF( lsame( norm, 'I' ) ) THEN
175 *
176 * Find normI(A).
177 *
178  IF( n.EQ.1 ) THEN
179  anorm = abs( d( 1 ) )
180  ELSE
181  anorm = abs( d( 1 ) )+abs( du( 1 ) )
182  temp = abs( d( n ) )+abs( dl( n-1 ) )
183  IF( anorm .LT. temp .OR. disnan( temp ) ) anorm = temp
184  DO 30 i = 2, n - 1
185  temp = abs( d( i ) )+abs( du( i ) )+abs( dl( i-1 ) )
186  IF( anorm .LT. temp .OR. disnan( temp ) ) anorm = temp
187  30 CONTINUE
188  END IF
189  ELSE IF( ( lsame( norm, 'F' ) ) .OR. ( lsame( norm, 'E' ) ) ) THEN
190 *
191 * Find normF(A).
192 *
193  scale = zero
194  sum = one
195  CALL zlassq( n, d, 1, scale, sum )
196  IF( n.GT.1 ) THEN
197  CALL zlassq( n-1, dl, 1, scale, sum )
198  CALL zlassq( n-1, du, 1, scale, sum )
199  END IF
200  anorm = scale*sqrt( sum )
201  END IF
202 *
203  zlangt = anorm
204  RETURN
205 *
206 * End of ZLANGT
207 *
logical function lsame(CA, CB)
LSAME
Definition: lsame.f:55
double precision function zlangt(NORM, N, DL, D, DU)
ZLANGT returns the value of the 1-norm, Frobenius norm, infinity-norm, or the largest absolute value ...
Definition: zlangt.f:108
logical function disnan(DIN)
DISNAN tests input for NaN.
Definition: disnan.f:61
subroutine zlassq(N, X, INCX, SCALE, SUMSQ)
ZLASSQ updates a sum of squares represented in scaled form.
Definition: zlassq.f:108
Here is the call graph for this function: