XLPack 7.0
Python API Reference Manual
Loading...
Searching...
No Matches

◆ ssr_csr()

def ssr_csr ( uplo  ,
,
val  ,
rowptr  ,
colind  ,
base  ,
val2  ,
rowptr2  ,
colind2  ,
base2   
)

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

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.
Returns
info (int)
= 0: Successful exit.
= i < 0: The (-i)-th argument is invalid.
= j > 0: j elements in input matrix were ignored.
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]valNumpy ndarray (1-dimensional, float, nnz)
Values of nonzero elements of input matrix (nnz is the number of nonzero elements of input matrix).
[in]rowptrNumpy ndarray (1-dimensional, int32, n + 1)
Row pointers of input matrix.
[in]colindNumpy ndarray (1-dimensional, int32, nnz)
Column indices of input matrix (nnz is the number of nonzero elements 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.
[out]val2Numpy ndarray (1-dimensional, float, nnz2)
Values of nonzero elements of output matrix (nnz2, the size of arrays val2 and colind2, must be greater than the number of nonzero elements of the output matrix).
[out]rowptr2Numpy ndarray (1-dimensional, int32, n + 1)
Row pointers of output matrix.
[out]colind2Numpy ndarray (1-dimensional, int32, nnz2)
Column indices of output matrix (nnz2, the size of arrays val2 and colind2, must be greater than the number of nonzero elements of the 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.