|
|
◆ csr_ssr()
| def csr_ssr |
( |
uplo |
, |
|
|
n |
, |
|
|
val |
, |
|
|
rowptr |
, |
|
|
colind |
, |
|
|
base |
, |
|
|
val2 |
, |
|
|
rowptr2 |
, |
|
|
colind2 |
, |
|
|
base2 |
|
|
) |
| |
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.
- 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] | 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 | Numpy ndarray (1-dimensional, float, nnz)
Values of nonzero elements of input matrix (nnz is the number of nonzero elements of input matrix). |
| [in] | rowptr | Numpy ndarray (1-dimensional, int32, n + 1)
Row pointers of input matrix. |
| [in] | colind | Numpy ndarray (1-dimensional, int32, nnz)
Column indices of input matrix (nnz is the number of nonzero elements of input matrix). |
| [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. |
| [out] | val2 | Numpy 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 upper or lower triangular part of the input matrix). |
| [out] | rowptr2 | Numpy ndarray (1-dimensional, int32, n + 1)
Row pointers of output matrix. |
| [out] | colind2 | Numpy 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 upper or lower triangular part of the input 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. |
|