XLPack 7.0
XLPack Numerical Library (Excel VBA) Reference Manual
Loading...
Searching...
No Matches

◆ CsrDussm()

Sub CsrDussm ( Uplo As  String,
Trans As  String,
Diag As  String,
N As  Long,
Nrhs As  Long,
Val() As  Double,
Rowptr() As  Long,
Colind() As  Long,
X() As  Double,
Optional Info As  Long,
Optional Base As  Long = -1 
)

Solution of AX = B or ATX = B (Triangular matrices) (CSR)

Purpose
This function solves one of the following systems of equations for a sparse matrix in CSR format.
A*X = B or A^T*X = B
where A is an N x N upper or lower sparse triangular matrix, and B and X are N x Nrhs dense matrices.
Parameters
[in]UploSpecifies whether the matrix A is an upper or lower triangular matrix as follows:
= "U": A is an upper triangular matrix.
= "L": A is an lower triangular matrix.
The other triangular elements (not including diagonal elements) are ignored.
[in]TransSpecifies the equation to be solved as follows:
= "N": A*X = B.
= "T" or "C": A^T*X = B.
[in]DiagSpecifies whether or not the matrix A is assumed to be unit triangular.
= "N": A is not assumed to be unit triangular.
= "U": A is assumed to be unit triangular. (Diagonal elements are assumed to be ones. Elements of Val() at diagonal element positions (if exist) are ignored.)
[in]NNumber of rows and columns of matrix A. (N >= 0) (If N = 0, returns without computation)
[in]NrhsNumber of columns of matrices B and C. (Nrhs >= 0) (if Nrhs = 0, returns without computation)
[in]Val()Array Val(LVal - 1) (LVal >= Nnz) (Nnz is the number of nonzero elements of matrix A)
Values of nonzero elements of matrix A.
[in]Rowptr()Array Rowptr(LRowptr - 1) (LRowptr >= N + 1)
Row pointers of matrix A.
[in]Colind()Array Colind(LColind - 1) (LColind >= Nnz)
Column indices of matrix A.
[in,out]X()Array X(LX1 - 1, LX2 - 1) (LX1 >= N, LX2 >= Nrhs)
[in] Right-hand side matrix B.
[out] Solution matrix X.
[out]Info(Optional)
= 0: Successful exit.
= i < 0: The (-i)-th argument is invalid.
= i > 0: The matrix is singular (i-th diagonal element is zero).
[in]Base(Optional)
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.
(default: Assumes 1 if Rowptr(0) = 1, 0 otherwise)