|
|
◆ dense_csr()
| def dense_csr |
( |
m |
, |
|
|
n |
, |
|
|
a |
, |
|
|
maxnnz |
, |
|
|
val |
, |
|
|
rowptr |
, |
|
|
colind |
, |
|
|
base |
|
|
) |
| |
Dense matrix -> CSR
- Purpose
- This routine converts the dense matrix to the sparse matrix in CSR format.
- Returns
- info (int)
= 0: Successful exit.
= i < 0: The (-i)-th argument is invalid.
= 10: Insufficient outout array size (maxnnz is too small).
- 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 | Numpy ndarray (2-dimensional, float, m x n)
Input matrix. |
| [in] | maxnnz | Size of arrays val[] and colind[] (must be greater than the number of nonzero elements of the input matrix). (maxnnz > 0) |
| [out] | val | Numpy ndarray (1-dimensional, float, maxnnz)
Values of nonzero elements of output matrix in CSR format. |
| [out] | rowptr | Numpy ndarray (1-dimensional, int32, m + 1)
Row pointers of output matrix in CSR format. |
| [out] | colind | Numpy ndarray (1-dimensional, int32, maxnnz)
Column indices of output matrix in CSR format. |
| [in] | base | Indexing of rowptr and colind.
= 0: Zero-based (C style) indexing: Starting index is 0.
= 1: One-based (Fortran style) indexing: Starting index is 1. |
|