naginterfaces.library.matop.complex_​addsub

naginterfaces.library.matop.complex_addsub(transa, transb, m, n, alpha, a, beta, b)[source]

complex_addsub adds two complex matrices, each one optionally transposed and multiplied by a scalar.

For full information please refer to the NAG Library document for f01cw

https://www.nag.com/numeric/nl/nagdoc_28.4/flhtml/f01/f01cwf.html

Parameters
transastr, length 1

and must specify whether or not the matrix and the matrix , respectively, are to be transposed before addition.

or

The matrix will not be transposed.

or

The matrix will be transposed.

or

The matrix will be transposed and conjugated.

transbstr, length 1

and must specify whether or not the matrix and the matrix , respectively, are to be transposed before addition.

or

The matrix will not be transposed.

or

The matrix will be transposed.

or

The matrix will be transposed and conjugated.

mint

, the number of rows of the matrices and or their transposes. Also the number of rows of the matrix .

nint

, the number of columns of the matrices and or their transposes. Also the number of columns of the matrix .

alphacomplex

The scalar , by which matrix is multiplied before addition.

acomplex, array-like, shape

Note: the required extent for this argument in dimension 1 is determined as follows: if : ; otherwise: .

Note: the required extent for this argument in dimension 2 is determined as follows: if : ; if : ; if : ; otherwise: .

The matrix . If , the array is not referenced.

betacomplex

The scalar , by which matrix is multiplied before addition.

bcomplex, array-like, shape

Note: the required extent for this argument in dimension 1 is determined as follows: if : ; otherwise: .

Note: the required extent for this argument in dimension 2 is determined as follows: if : ; if : ; if : ; otherwise: .

The matrix . If , the array is not referenced.

Returns
ccomplex, ndarray, shape

The elements of the matrix .

Raises
NagValueError
(errno )

On entry, .

Constraint: , or .

(errno )

On entry, .

Constraint: , or .

(errno )

On entry, and .

Constraint: and .

(errno )

On entry, and .

Constraint: if , .

(errno )

On entry, and .

Constraint: if , .

(errno )

On entry, and .

Constraint: if , .

(errno )

On entry, and .

Constraint: if , .

Notes

No equivalent traditional C interface for this routine exists in the NAG Library.

complex_addsub performs one of the operations

,

,

,

,

,

,

,

or

,

where , and are matrices, and are scalars, denotes transposition and denotes conjugate transposition. For efficiency, the function 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 or matrices, depending on whether they are to be transposed before addition. is an matrix.