1 *> \brief \b ZLANSY 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 symmetric matrix.
3 * =========== DOCUMENTATION ===========
5 * Online html documentation available at
6 * http://www.netlib.org/lapack/explore-html/
9 *> Download ZLANSY + dependencies
10 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlansy.f">
12 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlansy.f">
14 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlansy.f">
21 * DOUBLE PRECISION FUNCTION ZLANSY( NORM, UPLO, N, A, LDA, WORK )
23 * .. Scalar Arguments ..
24 * CHARACTER NORM, UPLO
27 * .. Array Arguments ..
28 * DOUBLE PRECISION WORK( * )
29 * COMPLEX*16 A( LDA, * )
38 *> ZLANSY 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 symmetric matrix A.
46 *> ZLANSY = ( 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 ZLANSY as described
72 *> UPLO is CHARACTER*1
73 *> Specifies whether the upper or lower triangular part of the
74 *> symmetric matrix A is to be referenced.
75 *> = 'U': Upper triangular part of A is referenced
76 *> = 'L': Lower triangular part of A is referenced
82 *> The order of the matrix A. N >= 0. When N = 0, ZLANSY is
88 *> A is COMPLEX*16 array, dimension (LDA,N)
89 *> The symmetric matrix A. If UPLO = 'U', the leading n by n
90 *> upper triangular part of A contains the upper triangular part
91 *> of the matrix A, and the strictly lower triangular part of A
92 *> is not referenced. If UPLO = 'L', the leading n by n lower
93 *> triangular part of A contains the lower triangular part of
94 *> the matrix A, and the strictly upper triangular part of A is
101 *> The leading dimension of the array A. LDA >= max(N,1).
106 *> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK)),
107 *> where LWORK >= N when NORM = 'I' or '1' or 'O'; otherwise,
108 *> WORK is not referenced.
114 *> \author Univ. of Tennessee
115 *> \author Univ. of California Berkeley
116 *> \author Univ. of Colorado Denver
119 *> \date November 2015
121 *> \ingroup complex16SYauxiliary
123 * =====================================================================
124 DOUBLE PRECISION FUNCTION ZLANSY( NORM, UPLO, N, A, LDA, WORK )
126 * -- LAPACK auxiliary routine (version 3.6.0) --
127 * -- LAPACK is a software package provided by Univ. of Tennessee, --
128 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
131 * .. Scalar Arguments ..
135 * .. Array Arguments ..
136 DOUBLE PRECISION WORK( * )
137 COMPLEX*16 A( LDA, * )
140 * =====================================================================
143 DOUBLE PRECISION ONE, ZERO
144 PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 )
146 * .. Local Scalars ..
148 DOUBLE PRECISION ABSA, SCALE, SUM, VALUE
150 * .. External Functions ..
151 LOGICAL LSAME, DISNAN
152 EXTERNAL LSAME, DISNAN
154 * .. External Subroutines ..
157 * .. Intrinsic Functions ..
160 * .. Executable Statements ..
164 ELSE IF( LSAME( NORM, 'M' ) ) THEN
166 * Find max(abs(A(i,j))).
169 IF( LSAME( UPLO, 'U' ) ) THEN
172 SUM = ABS( A( I, J ) )
173 IF( VALUE .LT. SUM .OR. DISNAN( SUM ) ) VALUE = SUM
179 SUM = ABS( A( I, J ) )
180 IF( VALUE .LT. SUM .OR. DISNAN( SUM ) ) VALUE = SUM
184 ELSE IF( ( LSAME( NORM, 'I' ) ) .OR. ( LSAME( NORM, 'O' ) ) .OR.
185 $ ( NORM.EQ.'1' ) ) THEN
187 * Find normI(A) ( = norm1(A), since A is symmetric).
190 IF( LSAME( UPLO, 'U' ) ) THEN
194 ABSA = ABS( A( I, J ) )
196 WORK( I ) = WORK( I ) + ABSA
198 WORK( J ) = SUM + ABS( A( J, J ) )
202 IF( VALUE .LT. SUM .OR. DISNAN( SUM ) ) VALUE = SUM
209 SUM = WORK( J ) + ABS( A( J, J ) )
211 ABSA = ABS( A( I, J ) )
213 WORK( I ) = WORK( I ) + ABSA
215 IF( VALUE .LT. SUM .OR. DISNAN( SUM ) ) VALUE = SUM
218 ELSE IF( ( LSAME( NORM, 'F' ) ) .OR. ( LSAME( NORM, 'E' ) ) ) THEN
224 IF( LSAME( UPLO, 'U' ) ) THEN
226 CALL ZLASSQ( J-1, A( 1, J ), 1, SCALE, SUM )
230 CALL ZLASSQ( N-J, A( J+1, J ), 1, SCALE, SUM )
234 CALL ZLASSQ( N, A, LDA+1, SCALE, SUM )
235 VALUE = SCALE*SQRT( SUM )