LAPACK  3.9.0 LAPACK: Linear Algebra PACKage

## ◆ clanht()

 real function clanht ( character NORM, integer N, real, dimension( * ) D, complex, dimension( * ) E )

CLANHT returns the value of the 1-norm, or the Frobenius norm, or the infinity norm, or the element of largest absolute value of a complex Hermitian tridiagonal matrix.

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

Purpose:
``` CLANHT  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 Hermitian tridiagonal matrix A.```
Returns
CLANHT
```    CLANHT = ( 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 CLANHT as described above.``` [in] N ``` N is INTEGER The order of the matrix A. N >= 0. When N = 0, CLANHT is set to zero.``` [in] D ``` D is REAL array, dimension (N) The diagonal elements of A.``` [in] E ``` E is COMPLEX array, dimension (N-1) The (n-1) sub-diagonal or super-diagonal elements of A.```
Date
December 2016

Definition at line 103 of file clanht.f.

103 *
104 * -- LAPACK auxiliary routine (version 3.7.0) --
105 * -- LAPACK is a software package provided by Univ. of Tennessee, --
106 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
107 * December 2016
108 *
109 * .. Scalar Arguments ..
110  CHARACTER NORM
111  INTEGER N
112 * ..
113 * .. Array Arguments ..
114  REAL D( * )
115  COMPLEX E( * )
116 * ..
117 *
118 * =====================================================================
119 *
120 * .. Parameters ..
121  REAL ONE, ZERO
122  parameter( one = 1.0e+0, zero = 0.0e+0 )
123 * ..
124 * .. Local Scalars ..
125  INTEGER I
126  REAL ANORM, SCALE, SUM
127 * ..
128 * .. External Functions ..
129  LOGICAL LSAME, SISNAN
130  EXTERNAL lsame, sisnan
131 * ..
132 * .. External Subroutines ..
133  EXTERNAL classq, slassq
134 * ..
135 * .. Intrinsic Functions ..
136  INTRINSIC abs, sqrt
137 * ..
138 * .. Executable Statements ..
139 *
140  IF( n.LE.0 ) THEN
141  anorm = zero
142  ELSE IF( lsame( norm, 'M' ) ) THEN
143 *
144 * Find max(abs(A(i,j))).
145 *
146  anorm = abs( d( n ) )
147  DO 10 i = 1, n - 1
148  sum = abs( d( i ) )
149  IF( anorm .LT. sum .OR. sisnan( sum ) ) anorm = sum
150  sum = abs( e( i ) )
151  IF( anorm .LT. sum .OR. sisnan( sum ) ) anorm = sum
152  10 CONTINUE
153  ELSE IF( lsame( norm, 'O' ) .OR. norm.EQ.'1' .OR.
154  \$ lsame( norm, 'I' ) ) THEN
155 *
156 * Find norm1(A).
157 *
158  IF( n.EQ.1 ) THEN
159  anorm = abs( d( 1 ) )
160  ELSE
161  anorm = abs( d( 1 ) )+abs( e( 1 ) )
162  sum = abs( e( n-1 ) )+abs( d( n ) )
163  IF( anorm .LT. sum .OR. sisnan( sum ) ) anorm = sum
164  DO 20 i = 2, n - 1
165  sum = abs( d( i ) )+abs( e( i ) )+abs( e( i-1 ) )
166  IF( anorm .LT. sum .OR. sisnan( sum ) ) anorm = sum
167  20 CONTINUE
168  END IF
169  ELSE IF( ( lsame( norm, 'F' ) ) .OR. ( lsame( norm, 'E' ) ) ) THEN
170 *
171 * Find normF(A).
172 *
173  scale = zero
174  sum = one
175  IF( n.GT.1 ) THEN
176  CALL classq( n-1, e, 1, scale, sum )
177  sum = 2*sum
178  END IF
179  CALL slassq( n, d, 1, scale, sum )
180  anorm = scale*sqrt( sum )
181  END IF
182 *
183  clanht = anorm
184  RETURN
185 *
186 * End of CLANHT
187 *
Here is the call graph for this function:
clanht
real function clanht(NORM, N, D, E)
CLANHT returns the value of the 1-norm, or the Frobenius norm, or the infinity norm,...
Definition: clanht.f:103
classq
subroutine classq(N, X, INCX, SCALE, SUMSQ)
CLASSQ updates a sum of squares represented in scaled form.
Definition: classq.f:108
slassq
subroutine slassq(N, X, INCX, SCALE, SUMSQ)
SLASSQ updates a sum of squares represented in scaled form.
Definition: slassq.f:105
sisnan
logical function sisnan(SIN)
SISNAN tests input for NaN.
Definition: sisnan.f:61
lsame
logical function lsame(CA, CB)
LSAME
Definition: lsame.f:55