naginterfaces.library.sparse.complex_​gen_​matvec

naginterfaces.library.sparse.complex_gen_matvec(trans, a, irow, icol, x, check='N')[source]

complex_gen_matvec computes a matrix-vector or conjugate transposed matrix-vector product involving a complex sparse non-Hermitian matrix stored in coordinate storage format.

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

https://support.nag.com/numeric/nl/nagdoc_30.2/flhtml/f11/f11xnf.html

Parameters
transstr, length 1

Specifies whether or not the matrix is conjugate transposed.

is computed.

is computed.

acomplex, array-like, shape

The nonzero elements in the matrix , ordered by increasing row index, and by increasing column index within each row. Multiple entries for the same row and column indices are not permitted. The function complex_gen_sort() may be used to order the elements in this way.

irowint, array-like, shape

The row indices of the nonzero elements supplied in array .

icolint, array-like, shape

The column indices of the nonzero elements supplied in array .

xcomplex, array-like, shape

The vector .

checkstr, length 1, optional

Specifies whether or not the CS representation of the matrix , values of , , and should be checked.

Checks are carried on the values of , , and .

None of these checks are carried out.

See also Further Comments.

Returns
ycomplex, ndarray, shape

The vector .

Raises
NagValueError
(errno )

On entry, .

Constraint: or .

(errno )

On entry, .

Constraint: or .

(errno )

On entry, and .

Constraint: .

(errno )

On entry, .

Constraint: .

(errno )

On entry, .

Constraint: .

(errno )

On entry, the location () is a duplicate: .

(errno )

On entry, is out of order: .

(errno )

On entry, , and .

Constraint: and .

(errno )

On entry, , and .

Constraint: and .

Notes

complex_gen_matvec computes either the matrix-vector product , or the conjugate transposed matrix-vector product , according to the value of the argument , where is a complex sparse non-Hermitian matrix, of arbitrary sparsity pattern. The matrix is stored in coordinate storage (CS) format (see the F11 Introduction). The array stores all the nonzero elements of , while arrays and store the corresponding row and column indices respectively.

It is envisaged that a common use of complex_gen_matvec will be to compute the matrix-vector product required in the application of complex_gen_basic_solver() to sparse complex linear systems.