|
|
◆ ZCsxDiag()
| Sub ZCsxDiag |
( |
M As |
Long, |
|
|
N As |
Long, |
|
|
Val() As |
Complex, |
|
|
Ptr() As |
Long, |
|
|
Ind() As |
Long, |
|
|
Alpha As |
Complex, |
|
|
D() As |
Complex, |
|
|
Optional Info As |
Long, |
|
|
Optional Inv As |
Long = 0, |
|
|
Optional Base As |
Long = -1, |
|
|
Optional Incd As |
Long = 1 |
|
) |
| |
Diagonal elements of sparse matrix (Complex matrices) (CSC/CSR)
- Purpose
- This routine stores the diagonal elements of complex sparse matrix in CSC or CSR format into the array D().
D(i) = alpha*di or alpha/di (i = 0 to min(M, N) - 1)
where di is the i-th diagonal element and alpha is the scalar.
- 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] | Val() | Array Val(LVal - 1) (LVal >= Nnz) (Nnz is the number of nonzero elements of the matrix)
Values of nonzero elements of the matrix. |
| [in] | Ptr() | Array Ptr(LPtr - 1) (LPtr >= N + 1 (CSC), LPtr >= M + 1 (CSR))
Column pointers (if CSC) or row pointers (if CSR) of the matrix. |
| [in] | Ind() | Array Ind(LInd - 1) (LInd >= Nnz)
Row indices (if CSC) or column indices (if CSR) of the matrix. |
| [in] | Alpha | Scalar alpha. |
| [out] | D() | Array D(LD - 1) (LD >= min(M, N))
alpha*di or alpha/di (i = 0 to min(M, N) - 1). |
| [out] | Info | (Optional)
= 0: Successful exit.
= i < 0: The (-i)-th argument is invalid or has an illegal value.
= j > 0: The j diagonal elements are not found. |
| [in] | Inv | (Optional)
= 0: Store alpha*di in D(i). (default = 0)
!= 0: Store alpha/di in D(i). |
| [in] | Base | (Optional)
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.
(default: Assumes 1 if Ptr(0) = 1, 0 otherwise) |
| [in] | IncD | (Optional)
Storage spacing between elements of D(). (IncD <> 0) (default = 1) |
|