3 Description

nag_sparse_nsym_sort (f11zac) takes a coordinate storage (CS) representation (see the f11 Chapter Introduction) of a real n by n sparse nonsymmetric matrix A, and reorders the nonzero elements by increasing row index and increasing column index within each row. Entries with duplicate row and column indices may be removed, or the values may be summed. Any entries with zero values may optionally be removed.

nag_sparse_nsym_sort (f11zac) also returns istr which contains the starting indices of each row in A.

4 References

None.

5 Arguments

1:
n – IntegerInput

On entry: the order of the matrix A.

Constraint:
n≥1.

2:
nnz – Integer *Input/Output

On entry: the number of nonzero elements in the matrix A.

Constraint:
nnz≥0.

On exit: the number of nonzero elements with unique row and column indices.

3:
a[max1,nnz] – doubleInput/Output

On entry: the nonzero elements of the matrix A. These may be in any order and there may be multiple nonzero elements with the same row and column indices.

On exit: the nonzero elements ordered by increasing row index, and by increasing column index within each row. Each nonzero element has a unique row and column index.