|
|
◆ csr_ssr()
| void csr_ssr |
( |
char |
uplo, |
|
|
int |
n, |
|
|
const double |
val[], |
|
|
const int |
rowptr[], |
|
|
const int |
colind[], |
|
|
int |
base, |
|
|
int |
maxnnz2, |
|
|
double |
val2[], |
|
|
int |
rowptr2[], |
|
|
int |
colind2[], |
|
|
int |
base2, |
|
|
int * |
info |
|
) |
| |
CSR (symmetric full matrix) -> SSR (CSR sparse matrix packed form)
- Purpose
- This routine converts the general CSR sparse matrix containing all elements to the symmetric CSR sparse matrix containing only upper or lower triangular elements.
In current version, the triangular elements (not including diagonal elements) other than specified by uplo in input matrix will be simply ignored, and it is not tested if it is symmetric matrix.
- Parameters
-
| [in] | uplo | Specifies whether the upper or lower triangular part is stored in the output matrix.
= 'U': Upper triangular part.
= 'L': Lower triangular part. |
| [in] | n | Number of rows and columns of matrix. (n >= 0) (if n = 0, returns without computation) |
| [in] | val[] | Array val[lval] (lval >= nnz)
Values of nonzero elements of input matrix (where nnz is the number of nonzero elements). |
| [in] | rowptr[] | Array rowptr[lrowptr] (lrowptr >= n + 1)
Row pointers of input matrix. |
| [in] | colind[] | Array colind[lcolind] (lcolind >= nnz)
Column indices of input matrix (where nnz is the number of nonzero elements). |
| [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. |
| [in] | maxnnz2 | Size of arrays val2[] and colind2[] (must be greater than the number of nonzero elements of the upper or lower triangular part of input matrix). (maxnnz2 > 0) |
| [out] | val2[] | Array val2[lval2] (lval2 >= maxnnz2)
Values of nonzero elements of output matrix. |
| [out] | rowptr2[] | Array rowptr2[lrowptr2] (lrowptr2 >= n + 1)
Row pointers of output matrix. |
| [out] | colind2[] | Array colind2[lcolind2] (lcolind2 >= maxnnz2)
Column indices of output matrix. |
| [in] | base2 | Indexing of rowptr2[] 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.
= j > 0: j elements in input matrix were ignored. |
|