nag_real_cholesky_skyline_solve (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
nag_real_cholesky_skyline (f01mcc). Related systems may also be solved.
The normal use of nag_real_cholesky_skyline_solve (f04mcc) is the solution of the systems
, following a call of
nag_real_cholesky_skyline (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:
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 9 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.
- 1:
selct – 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:
n – IntegerInput
-
On entry: , the order of the matrix .
Constraint:
.
- 3:
nrhs – IntegerInput
-
On entry: , the number of right-hand sides.
Constraint:
.
- 4:
al[lal] – const doubleInput
-
On entry: the elements within the envelope of the lower triangular matrix
, taken in row by row order, as returned by
nag_real_cholesky_skyline (f01mcc). The unit diagonal elements of
must be stored explicitly.
- 5:
lal – IntegerInput
-
On entry: the dimension of the array
al.
Constraint:
.
- 6:
d[n] – const doubleInput
-
On entry: the diagonal elements of the diagonal matrix
.
d is not referenced if
,
or
- 7:
row[n] – 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:
b[] – const doubleInput
-
Note: the th element of the matrix is stored in .
On entry: the
by
right-hand side matrix
. See also
Section 8.
- 9:
tdb – IntegerInput
-
On entry: the stride separating matrix column elements in the array
b.
Constraint:
.
- 10:
x[] – doubleOutput
-
Note: the th element of the matrix is stored in .
On exit: the
by
solution matrix
. See also
Section 8.
- 11:
tdx – IntegerInput
-
On entry: the stride separating matrix column elements in the array
x.
Constraint:
.
- 12:
fail – NagError *Input/Output
-
The NAG error argument (see
Section 3.6 in the Essential Introduction).
- NE_2_INT_ARG_GT
On entry, while . These arguments must satisfy .
- NE_2_INT_ARG_LT
On entry, while . These arguments must satisfy .
On entry, while . These arguments must satisfy .
On entry, while . These arguments must satisfy .
- NE_BAD_PARAM
On entry, argument
selct had an illegal value.
- NE_INT_ARG_LT
On entry, .
Constraint: .
On entry, .
Constraint: .
On entry, must not be less than 1: .
- NE_NOT_UNIT_DIAG
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 .
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)).
The time taken by nag_real_cholesky_skyline_solve (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.
To solve the system of equations
, where
Here
is symmetric and positive definite and must first be factorized by
nag_real_cholesky_skyline (f01mcc).