|
|
◆ csc_csr()
| void csc_csr |
( |
int |
m, |
|
|
int |
n, |
|
|
const double |
val[], |
|
|
const int |
ptr[], |
|
|
const int |
ind[], |
|
|
int |
base, |
|
|
double |
val2[], |
|
|
int |
ptr2[], |
|
|
int |
ind2[], |
|
|
int |
base2, |
|
|
int * |
info |
|
) |
| |
CSC <-> CSR
- Purpose
- This routine converts the sparse matrix in CSC format to the sparse matrix in CSR format or vice versa.
Also this function can be used to compute the transpose of input matrix in same 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] | val[] | Array val[lval] (lval >= nnz) (nnz is the number of nonzero elements of input matrix)
Values of nonzero elements of input matrix. |
| [in] | ptr[] | Array ptr[lptr] (lptr >= n + 1 (if CSC) or lptr >= m + 1 (if CSR))
Column pointers (if CSC) or row pointers (if CSR) of input matrix. |
| [in] | ind[] | Array ind[lind] (lind >= nnz)
Row indices (if CSC) or column indices (if CSR) of input matrix. |
| [in] | base | Indexing of ptr[] and ind[].
= 0: Zero-based (C style) indexing: Starting index is 0.
= 1: One-based (Fortran style) indexing: Starting index is 1. |
| [out] | val2[] | Array val2[lval2] (lval2 >= nnz)
Values of nonzero elements of output matrix. |
| [out] | ptr2[] | Array ptr2[lptr2] (lptr2 >= n + 1 (if CSC) or lptr2 >= m + 1 (if CSR))
Column pointers (if CSC) or row pointers (if CSR) of output matrix. |
| [out] | ind2[] | Array ind2[lind2] (lind2 >= nnz)
Row indices (if CSC) or column indices (if CSR) of output matrix. |
| [in] | base2 | Indexing of ptr2[] and ind2[].
= 0: Zero-based (C style) indexing: Starting index is 0.
= 1: One-based (Fortran style) indexing: Starting index is 1. |
| [out] | info | = 0: Successful exit.
= i < 0: The (-i)-th argument is invalid. |
|