XLPack 7.0
XLPack Numerical Library (C API) Reference Manual
Loading...
Searching...
No Matches

◆ csc_coo()

void csc_coo ( int  m,
int  n,
const double  val[],
const int  colptr[],
const int  rowind[],
int  base,
double  val2[],
int  rowind2[],
int  colind2[],
int  base2,
int *  info 
)

CSC -> COO

Purpose
This routine converts the sparse matrix in CSC format to the sparse matrix in COO format.

The order of elements of output matrix will be same as val array of input matrix. Arrys val and val2, and, rowind and rowind2 may be identical arrays.
Parameters
[in]mNumber of rows of the matrix. (m >= 0) (if m = 0, returns without computation)
[in]nNumber 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.
[out]colptr[]Array colptr[lcolptr] (lcolptr >= n + 1)
Column pointers of input matrix.
[in]rowind[]Array rowind[lrowind] (lrowind >= nnz)
Row indices of input matrix.
[in]baseIndexing of colptr[] and rowind[].
= 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]rowind2[]Array rowind2[lrowind2] (lrowind2 >= nnz)
Row indices of output matrix.
[out]colind2[]Array colind2[lcolind2] (lcolind2 >= nnz)
Column indices of output matrix.
[in]base2Indexing of rowind2[] and colind2[].
= 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.