F01CWF adds two complex matrices, each one optionally transposed and multiplied by a scalar.
SUBROUTINE F01CWF ( |
TRANSA, TRANSB, M, N, ALPHA, A, LDA, BETA, B, LDB, C, LDC, IFAIL) |
INTEGER |
M, N, LDA, LDB, LDC, IFAIL |
COMPLEX (KIND=nag_wp) |
ALPHA, A(LDA,*), BETA, B(LDB,*), C(LDC,*) |
CHARACTER(1) |
TRANSA, TRANSB |
|
F01CWF performs one of the operations
- ,
- ,
- ,
- ,
- ,
- ,
- ,
- or
- ,
where
,
and
are matrices,
and
are scalars,
denotes transposition and
denotes conjugate transposition. For efficiency, the routine contains special code for the cases when one or both of
,
is equal to zero, unity or minus unity. The matrices, or their transposes, must be compatible for addition.
and
are either
by
or
by
matrices, depending on whether they are to be transposed before addition.
is an
by
matrix.
None.
If on entry
or
, explanatory error messages are output on the current error message unit (as defined by
X04AAF).
The time taken for a call of F01CWF varies with
M,
N and the values of
and
. The routine is quickest if either or both of
and
are equal to zero, or plus or minus unity.
The following program reads in a pair of matrices
and
, along with values for
TRANSA,
TRANSB,
ALPHA and
BETA, and adds them together, printing the result matrix
. The process is continued until the end of the input stream is reached.