1 *> \brief \b DLANST returns the value of the 1-norm, or the Frobenius norm, or the infinity norm, or the element of largest absolute value of a real symmetric tridiagonal matrix.
3 * =========== DOCUMENTATION ===========
5 * Online html documentation available at
6 * http://www.netlib.org/lapack/explore-html/
9 *> Download DLANST + dependencies
10 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlanst.f">
12 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlanst.f">
14 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlanst.f">
21 * DOUBLE PRECISION FUNCTION DLANST( NORM, N, D, E )
23 * .. Scalar Arguments ..
27 * .. Array Arguments ..
28 * DOUBLE PRECISION D( * ), E( * )
37 *> DLANST returns the value of the one norm, or the Frobenius norm, or
38 *> the infinity norm, or the element of largest absolute value of a
39 *> real symmetric tridiagonal matrix A.
45 *> DLANST = ( max(abs(A(i,j))), NORM = 'M' or 'm'
47 *> ( norm1(A), NORM = '1', 'O' or 'o'
49 *> ( normI(A), NORM = 'I' or 'i'
51 *> ( normF(A), NORM = 'F', 'f', 'E' or 'e'
53 *> where norm1 denotes the one norm of a matrix (maximum column sum),
54 *> normI denotes the infinity norm of a matrix (maximum row sum) and
55 *> normF denotes the Frobenius norm of a matrix (square root of sum of
56 *> squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
64 *> NORM is CHARACTER*1
65 *> Specifies the value to be returned in DLANST as described
72 *> The order of the matrix A. N >= 0. When N = 0, DLANST is
78 *> D is DOUBLE PRECISION array, dimension (N)
79 *> The diagonal elements of A.
84 *> E is DOUBLE PRECISION array, dimension (N-1)
85 *> The (n-1) sub-diagonal or super-diagonal elements of A.
91 *> \author Univ. of Tennessee
92 *> \author Univ. of California Berkeley
93 *> \author Univ. of Colorado Denver
96 *> \date September 2012
98 *> \ingroup OTHERauxiliary
100 * =====================================================================
101 DOUBLE PRECISION FUNCTION DLANST( NORM, N, D, E )
103 * -- LAPACK auxiliary routine (version 3.4.2) --
104 * -- LAPACK is a software package provided by Univ. of Tennessee, --
105 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
108 * .. Scalar Arguments ..
112 * .. Array Arguments ..
113 DOUBLE PRECISION D( * ), E( * )
116 * =====================================================================
119 DOUBLE PRECISION ONE, ZERO
120 PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 )
122 * .. Local Scalars ..
124 DOUBLE PRECISION ANORM, SCALE, SUM
126 * .. External Functions ..
127 LOGICAL LSAME, DISNAN
128 EXTERNAL LSAME, DISNAN
130 * .. External Subroutines ..
133 * .. Intrinsic Functions ..
136 * .. Executable Statements ..
140 ELSE IF( LSAME( NORM, 'M' ) ) THEN
142 * Find max(abs(A(i,j))).
144 ANORM = ABS( D( N ) )
147 IF( ANORM .LT. SUM .OR. DISNAN( SUM ) ) ANORM = SUM
149 IF( ANORM .LT. SUM .OR. DISNAN( SUM ) ) ANORM = SUM
151 ELSE IF( LSAME( NORM, 'O' ) .OR. NORM.EQ.'1' .OR.
152 $ LSAME( NORM, 'I' ) ) THEN
157 ANORM = ABS( D( 1 ) )
159 ANORM = ABS( D( 1 ) )+ABS( E( 1 ) )
160 SUM = ABS( E( N-1 ) )+ABS( D( N ) )
161 IF( ANORM .LT. SUM .OR. DISNAN( SUM ) ) ANORM = SUM
163 SUM = ABS( D( I ) )+ABS( E( I ) )+ABS( E( I-1 ) )
164 IF( ANORM .LT. SUM .OR. DISNAN( SUM ) ) ANORM = SUM
167 ELSE IF( ( LSAME( NORM, 'F' ) ) .OR. ( LSAME( NORM, 'E' ) ) ) THEN
174 CALL DLASSQ( N-1, E, 1, SCALE, SUM )
177 CALL DLASSQ( N, D, 1, SCALE, SUM )
178 ANORM = SCALE*SQRT( SUM )