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

◆ z_ssr_csr()

void z_ssr_csr ( char  uplo,
int  n,
const doublecomplex  val[],
const int  rowptr[],
const int  colind[],
int  base,
int  maxnnz2,
doublecomplex  val2[],
int  rowptr2[],
int  colind2[],
int  base2,
int *  info 
)

SSR (CSR sparse matrix packed form) -> CSR (symmetric full matrix) (Complex matrices)

Purpose
This routine converts the symmetric CSR sparse matrix containing only upper or lower triangular elements to the general CSR sparse matrix containing all elements.

The order of elements in each row of output matrix is same as that of input matrix (not to be sorted). The triangular elements (not including diagonal elements) other than specified by uplo in input matrix will be ignored if exist.
Parameters
[in]uploSpecifies whether the upper or lower triangular part of input matrix is stored.
= 'U': Upper triangular part.
= 'L': Lower triangular part.
[in]nNumber of rows and columns of 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]rowptr[]Array rowptr[lrowptr] (lrowptr >= n + 1)
Row pointers of input matrix.
[in]colind[]Array colind[lcolind] (lcolind >= nnz)
Column indices of input matrix.
[in]baseIndexing 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]maxnnz2Size of arrays val2[] and colind2[] (must be greater than the number of nonzero elements of output 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]base2Indexing 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.