LAPACK  3.6.1
LAPACK: Linear Algebra PACKage
subroutine zsgt01 ( integer  ITYPE,
character  UPLO,
integer  N,
integer  M,
complex*16, dimension( lda, * )  A,
integer  LDA,
complex*16, dimension( ldb, * )  B,
integer  LDB,
complex*16, dimension( ldz, * )  Z,
integer  LDZ,
double precision, dimension( * )  D,
complex*16, dimension( * )  WORK,
double precision, dimension( * )  RWORK,
double precision, dimension( * )  RESULT 
)

ZSGT01

Purpose:
 CDGT01 checks a decomposition of the form

    A Z   =  B Z D or
    A B Z =  Z D or
    B A Z =  Z D

 where A is a Hermitian matrix, B is Hermitian positive definite,
 Z is unitary, and D is diagonal.

 One of the following test ratios is computed:

 ITYPE = 1:  RESULT(1) = | A Z - B Z D | / ( |A| |Z| n ulp )

 ITYPE = 2:  RESULT(1) = | A B Z - Z D | / ( |A| |Z| n ulp )

 ITYPE = 3:  RESULT(1) = | B A Z - Z D | / ( |A| |Z| n ulp )
Parameters
[in]ITYPE
          ITYPE is INTEGER
          The form of the Hermitian generalized eigenproblem.
          = 1:  A*z = (lambda)*B*z
          = 2:  A*B*z = (lambda)*z
          = 3:  B*A*z = (lambda)*z
[in]UPLO
          UPLO is CHARACTER*1
          Specifies whether the upper or lower triangular part of the
          Hermitian matrices A and B is stored.
          = 'U':  Upper triangular
          = 'L':  Lower triangular
[in]N
          N is INTEGER
          The order of the matrix A.  N >= 0.
[in]M
          M is INTEGER
          The number of eigenvalues found.  M >= 0.
[in]A
          A is COMPLEX*16 array, dimension (LDA, N)
          The original Hermitian matrix A.
[in]LDA
          LDA is INTEGER
          The leading dimension of the array A.  LDA >= max(1,N).
[in]B
          B is COMPLEX*16 array, dimension (LDB, N)
          The original Hermitian positive definite matrix B.
[in]LDB
          LDB is INTEGER
          The leading dimension of the array B.  LDB >= max(1,N).
[in]Z
          Z is COMPLEX*16 array, dimension (LDZ, M)
          The computed eigenvectors of the generalized eigenproblem.
[in]LDZ
          LDZ is INTEGER
          The leading dimension of the array Z.  LDZ >= max(1,N).
[in]D
          D is DOUBLE PRECISION array, dimension (M)
          The computed eigenvalues of the generalized eigenproblem.
[out]WORK
          WORK is COMPLEX*16 array, dimension (N*N)
[out]RWORK
          RWORK is DOUBLE PRECISION array, dimension (N)
[out]RESULT
          RESULT is DOUBLE PRECISION array, dimension (1)
          The test ratio as described above.
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Date
November 2011

Definition at line 154 of file zsgt01.f.

154 *
155 * -- LAPACK test routine (version 3.4.0) --
156 * -- LAPACK is a software package provided by Univ. of Tennessee, --
157 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
158 * November 2011
159 *
160 * .. Scalar Arguments ..
161  CHARACTER uplo
162  INTEGER itype, lda, ldb, ldz, m, n
163 * ..
164 * .. Array Arguments ..
165  DOUBLE PRECISION d( * ), result( * ), rwork( * )
166  COMPLEX*16 a( lda, * ), b( ldb, * ), work( * ),
167  $ z( ldz, * )
168 * ..
169 *
170 * =====================================================================
171 *
172 * .. Parameters ..
173  DOUBLE PRECISION zero, one
174  parameter ( zero = 0.0d+0, one = 1.0d+0 )
175  COMPLEX*16 czero, cone
176  parameter ( czero = ( 0.0d+0, 0.0d+0 ),
177  $ cone = ( 1.0d+0, 0.0d+0 ) )
178 * ..
179 * .. Local Scalars ..
180  INTEGER i
181  DOUBLE PRECISION anorm, ulp
182 * ..
183 * .. External Functions ..
184  DOUBLE PRECISION dlamch, zlange, zlanhe
185  EXTERNAL dlamch, zlange, zlanhe
186 * ..
187 * .. External Subroutines ..
188  EXTERNAL zdscal, zhemm
189 * ..
190 * .. Executable Statements ..
191 *
192  result( 1 ) = zero
193  IF( n.LE.0 )
194  $ RETURN
195 *
196  ulp = dlamch( 'Epsilon' )
197 *
198 * Compute product of 1-norms of A and Z.
199 *
200  anorm = zlanhe( '1', uplo, n, a, lda, rwork )*
201  $ zlange( '1', n, m, z, ldz, rwork )
202  IF( anorm.EQ.zero )
203  $ anorm = one
204 *
205  IF( itype.EQ.1 ) THEN
206 *
207 * Norm of AZ - BZD
208 *
209  CALL zhemm( 'Left', uplo, n, m, cone, a, lda, z, ldz, czero,
210  $ work, n )
211  DO 10 i = 1, m
212  CALL zdscal( n, d( i ), z( 1, i ), 1 )
213  10 CONTINUE
214  CALL zhemm( 'Left', uplo, n, m, cone, b, ldb, z, ldz, -cone,
215  $ work, n )
216 *
217  result( 1 ) = ( zlange( '1', n, m, work, n, rwork ) / anorm ) /
218  $ ( n*ulp )
219 *
220  ELSE IF( itype.EQ.2 ) THEN
221 *
222 * Norm of ABZ - ZD
223 *
224  CALL zhemm( 'Left', uplo, n, m, cone, b, ldb, z, ldz, czero,
225  $ work, n )
226  DO 20 i = 1, m
227  CALL zdscal( n, d( i ), z( 1, i ), 1 )
228  20 CONTINUE
229  CALL zhemm( 'Left', uplo, n, m, cone, a, lda, work, n, -cone,
230  $ z, ldz )
231 *
232  result( 1 ) = ( zlange( '1', n, m, z, ldz, rwork ) / anorm ) /
233  $ ( n*ulp )
234 *
235  ELSE IF( itype.EQ.3 ) THEN
236 *
237 * Norm of BAZ - ZD
238 *
239  CALL zhemm( 'Left', uplo, n, m, cone, a, lda, z, ldz, czero,
240  $ work, n )
241  DO 30 i = 1, m
242  CALL zdscal( n, d( i ), z( 1, i ), 1 )
243  30 CONTINUE
244  CALL zhemm( 'Left', uplo, n, m, cone, b, ldb, work, n, -cone,
245  $ z, ldz )
246 *
247  result( 1 ) = ( zlange( '1', n, m, z, ldz, rwork ) / anorm ) /
248  $ ( n*ulp )
249  END IF
250 *
251  RETURN
252 *
253 * End of CDGT01
254 *
double precision function dlamch(CMACH)
DLAMCH
Definition: dlamch.f:65
double precision function zlanhe(NORM, UPLO, N, A, LDA, WORK)
ZLANHE 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 matrix.
Definition: zlanhe.f:126
subroutine zhemm(SIDE, UPLO, M, N, ALPHA, A, LDA, B, LDB, BETA, C, LDC)
ZHEMM
Definition: zhemm.f:193
double precision function zlange(NORM, M, N, A, LDA, WORK)
ZLANGE returns the value of the 1-norm, Frobenius norm, infinity-norm, or the largest absolute value ...
Definition: zlange.f:117
subroutine zdscal(N, DA, ZX, INCX)
ZDSCAL
Definition: zdscal.f:54

Here is the call graph for this function:

Here is the caller graph for this function: