|
|
◆ csx_diag_ind()
| void csx_diag_ind |
( |
int |
m, |
|
|
int |
n, |
|
|
const int |
ptr[], |
|
|
const int |
ind[], |
|
|
int |
base, |
|
|
int |
id[], |
|
|
int * |
info |
|
) |
| |
Indices to diagonal elements of sparse matrix (CSC/CSR)
- Purpose
- This routine stores the indices to diagonal elements of CSC/CSR sparse matrix into the array id[].
- 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] | ptr[] | Array ptr[lptr] (lptr >= n + 1)
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 (where nnz is the number of nonzero elements). |
| [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] | id[] | Array id[lid] (lid >= min(m, n))
Indices to diagonal elements (i = 0 to min(m, n) - 1). If diagonal element is not found, -1 is stored. |
| [out] | info | = 0: Successful exit.
= i < 0: The (-i)-th argument is invalid.
= j > 0: The j diagonal elements are not found. |
|