Purpose
To check if A = DIAG*I, where I is an M-by-N matrix with ones on the diagonal and zeros elsewhere, A is a complex matrix and DIAG is a complex scalar.Specification
LOGICAL FUNCTION MA02HZ( JOB, M, N, DIAG, A, LDA ) C .. Scalar Arguments .. CHARACTER JOB INTEGER LDA, M, N COMPLEX*16 DIAG C .. Array Arguments .. COMPLEX*16 A(LDA,*)Function Value
MA02HZ LOGICAL The function value is set to .TRUE. if A = DIAG*I, and to .FALSE., otherwise. If min(M,N) = 0, the value is .FALSE.Arguments
Mode Parameters
JOB CHARACTER*1 Specifies the part of the matrix A to be checked out, as follows: = 'U': Upper triangular/trapezoidal part; = 'L': Lower triangular/trapezoidal part. Otherwise: All of the matrix A.Input/Output Parameters
M (input) INTEGER The number of rows of the matrix A. M >= 0. N (input) INTEGER The number of columns of the matrix A. N >= 0. DIAG (input) COMPLEX*16 The scalar DIAG. A (input) COMPLEX*16 array, dimension (LDA,N) The leading M-by-N part of this array must contain the matrix A. If JOB = 'U', only the upper triangle or trapezoid is accessed; if JOB = 'L', only the lower triangle or trapezoid is accessed. LDA INTEGER The leading dimension of the array A. LDA >= max(1,M).Method
The routine returns immediately after detecting a diagonal element which differs from DIAG, or a nonzero off-diagonal element in the searched part of A.Further Comments
NoneExample
Program Text
NoneProgram Data
NoneProgram Results
None