|
|
◆ DenseCoo()
| Sub DenseCoo |
( |
M As |
Long, |
|
|
N As |
Long, |
|
|
A() As |
Double, |
|
|
Val() As |
Double, |
|
|
Rowind() As |
Long, |
|
|
Colind() As |
Long, |
|
|
Optional Info As |
Long, |
|
|
Optional Nnz As |
Long, |
|
|
Optional Base As |
Long = 0 |
|
) |
| |
Dense matrix -> COO
- Purpose
- This routine converts the dense matrix to the sparse matrix in COO format.
- Parameters
-
| [in] | M | Number of rows of the matrix. (M >= 0) (if M = 0, returns without computation) |
| [in] | N | Number of columns of the matrix. (N >= 0) (if N = 0, returns without computation) |
| [in] | A() | Array A(LA1 - 1, LA2 - 1) (LA1 >= M, LA2 >= N)
Input matrix. |
| [out] | Val() | Array Val(LVal - 1) (LVal >= Nnz) (Nnz >= the number of nonzero elements of input matrix)
Values of nonzero elements of the output matrix. |
| [out] | Rowind() | Array Rowind(LRowind - 1) (LRowind >= Nnz)
Row indices of the output matrix. |
| [out] | Colind() | Array Colind(LColind - 1) (LColind >= Nnz)
Column indices of the output matrix. |
| [out] | Info | (Optional)
= 0: Successful exit.
= i < 0: The (-i)-th argument is invalid.
= 10: Insufficient outout array size. |
| [out] | Nnz | (Optional)
Number of nonzero elements in the output matrix. |
| [in] | Base | (Optional)
Index style of Rowind() and Colind(). (default = 0)
= 0: Zero-based (C style) indexing: Starting index is 0.
= 1: One-based (Fortran style) indexing: Starting index is 1. |
|