f04mcc computes the approximate solution of a system of real linear equations with multiple right-hand sides, , where is a symmetric positive definite variable-bandwidth matrix, which has previously been factorized by f01mcc. Related systems may also be solved.
The function may be called by the names: f04mcc, nag_linsys_real_posdef_vband_solve or nag_real_cholesky_skyline_solve.
3Description
The normal use of f04mcc is the solution of the systems , following a call of f01mcc to determine the Cholesky factorization of the symmetric positive definite variable-bandwidth matrix .
However, the function may be used to solve any one of the following systems of linear algebraic equations:
(1)
(2)
(3)
(4)
(5)
(6)
denotes a unit lower triangular variable-bandwidth matrix of order , a diagonal matrix of order , and a set of right-hand sides.
The matrix is represented by the elements lying within its envelope, i.e., between the first nonzero of each row and the diagonal (see Section 10 for an example). The width of the th row is the number of elements between the first nonzero element and the element on the diagonal inclusive.
4References
Wilkinson J H and Reinsch C (1971) Handbook for Automatic Computation II, Linear Algebra Springer–Verlag
5Arguments
1: – Nag_SolveSystemInput
On entry: selct must specify the type of system to be solved, as follows:
if : solve ;
if : solve ;
if : solve ;
if : solve ;
if : solve ;
if : solve .
Constraint:
, , , , or .
2: – IntegerInput
On entry: , the order of the matrix .
Constraint:
.
3: – IntegerInput
On entry: , the number of right-hand sides.
Constraint:
.
4: – const doubleInput
On entry: the elements within the envelope of the lower triangular matrix , taken in row by row order, as returned by f01mcc. The unit diagonal elements of must be stored explicitly.
On entry: the diagonal elements of the diagonal matrix . d is not referenced if , or
7: – const IntegerInput
On entry: must contain the width of row of , i.e., the number of elements between the first (left-most) nonzero element and the element on the diagonal, inclusive.
Constraint:
for .
8: – const doubleInput
Note: the th element of the matrix is stored in .
On entry: the right-hand side matrix . See also Section 9.
9: – IntegerInput
On entry: the stride separating matrix column elements in the array b.
Constraint:
.
10: – doubleOutput
Note: the th element of the matrix is stored in .
On exit: the solution matrix . See also Section 9.
11: – IntegerInput
On entry: the stride separating matrix column elements in the array x.
Constraint:
.
12: – NagError *Input/Output
The NAG error argument (see Section 7 in the Introduction to the NAG Library CL Interface).
The lower triangular matrix has at least one diagonal element which is not equal to unity. The first non-unit element has been located in the array .
NE_ZERO_DIAG
The diagonal matrix is singular as it has at least one zero element. The first zero element has been located in the array .
7Accuracy
The usual backward error analysis of the solution of triangular system applies: each computed solution vector is exact for slightly perturbed matrices and , as appropriate (see pages 25-27 and 54-55 of Wilkinson and Reinsch (1971)).
8Parallelism and Performance
f04mcc is not threaded in any implementation.
9Further Comments
The time taken by f04mcc is approximately proportional to , where .
The function may be called with the same actual array supplied for the arguments b and x, in which case the solution matrix will overwrite the right-hand side matrix.
10Example
To solve the system of equations , where
Here is symmetric and positive definite and must first be factorized by f01mcc.