1 *> \brief \b 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.
3 * =========== DOCUMENTATION ===========
5 * Online html documentation available at
6 * http://www.netlib.org/lapack/explore-html/
9 *> Download CLANHT + dependencies
10 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/clanht.f">
12 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/clanht.f">
14 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/clanht.f">
21 * REAL FUNCTION CLANHT( NORM, N, D, E )
23 * .. Scalar Arguments ..
27 * .. Array Arguments ..
38 *> CLANHT returns the value of the one norm, or the Frobenius norm, or
39 *> the infinity norm, or the element of largest absolute value of a
40 *> complex Hermitian tridiagonal matrix A.
46 *> CLANHT = ( max(abs(A(i,j))), NORM = 'M' or 'm'
48 *> ( norm1(A), NORM = '1', 'O' or 'o'
50 *> ( normI(A), NORM = 'I' or 'i'
52 *> ( normF(A), NORM = 'F', 'f', 'E' or 'e'
54 *> where norm1 denotes the one norm of a matrix (maximum column sum),
55 *> normI denotes the infinity norm of a matrix (maximum row sum) and
56 *> normF denotes the Frobenius norm of a matrix (square root of sum of
57 *> squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
65 *> NORM is CHARACTER*1
66 *> Specifies the value to be returned in CLANHT as described
73 *> The order of the matrix A. N >= 0. When N = 0, CLANHT is
79 *> D is REAL array, dimension (N)
80 *> The diagonal elements of A.
85 *> E is COMPLEX array, dimension (N-1)
86 *> The (n-1) sub-diagonal or super-diagonal elements of A.
92 *> \author Univ. of Tennessee
93 *> \author Univ. of California Berkeley
94 *> \author Univ. of Colorado Denver
97 *> \date September 2012
99 *> \ingroup complexOTHERauxiliary
101 * =====================================================================
102 REAL FUNCTION CLANHT( NORM, N, D, E )
104 * -- LAPACK auxiliary routine (version 3.4.2) --
105 * -- LAPACK is a software package provided by Univ. of Tennessee, --
106 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
109 * .. Scalar Arguments ..
113 * .. Array Arguments ..
118 * =====================================================================
122 PARAMETER ( ONE = 1.0E+0, ZERO = 0.0E+0 )
124 * .. Local Scalars ..
126 REAL ANORM, SCALE, SUM
128 * .. External Functions ..
129 LOGICAL LSAME, SISNAN
130 EXTERNAL LSAME, SISNAN
132 * .. External Subroutines ..
133 EXTERNAL CLASSQ, SLASSQ
135 * .. Intrinsic Functions ..
138 * .. Executable Statements ..
142 ELSE IF( LSAME( NORM, 'M' ) ) THEN
144 * Find max(abs(A(i,j))).
146 ANORM = ABS( D( N ) )
149 IF( ANORM .LT. SUM .OR. SISNAN( SUM ) ) ANORM = SUM
151 IF( ANORM .LT. SUM .OR. SISNAN( SUM ) ) ANORM = SUM
153 ELSE IF( LSAME( NORM, 'O' ) .OR. NORM.EQ.'1' .OR.
154 $ LSAME( NORM, 'I' ) ) THEN
159 ANORM = ABS( D( 1 ) )
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
165 SUM = ABS( D( I ) )+ABS( E( I ) )+ABS( E( I-1 ) )
166 IF( ANORM .LT. SUM .OR. SISNAN( SUM ) ) ANORM = SUM
169 ELSE IF( ( LSAME( NORM, 'F' ) ) .OR. ( LSAME( NORM, 'E' ) ) ) THEN
176 CALL CLASSQ( N-1, E, 1, SCALE, SUM )
179 CALL SLASSQ( N, D, 1, SCALE, SUM )
180 ANORM = SCALE*SQRT( SUM )