naginterfaces.library.linsys.real_​posdef_​band_​solve

naginterfaces.library.linsys.real_posdef_band_solve(uplo, kd, ab, b)[source]

real_posdef_band_solve computes the solution to a real system of linear equations , where is an symmetric positive definite band matrix of band width , and and are matrices. An estimate of the condition number of and an error bound for the computed solution are also returned.

For full information please refer to the NAG Library document for f04bf

https://support.nag.com/numeric/nl/nagdoc_30.2/flhtml/f04/f04bff.html

Parameters
uplostr, length 1

If , the upper triangle of the matrix is stored.

If , the lower triangle of the matrix is stored.

kdint

The number of superdiagonals (and the number of subdiagonals) of the band matrix .

abfloat, array-like, shape

The symmetric band matrix . The upper or lower triangular part of the symmetric matrix is stored in the first rows of the array. The th column of is stored in the th column of the array as follows:

See Further Comments below for further details.

bfloat, array-like, shape

The matrix of right-hand sides .

Returns
abfloat, ndarray, shape

If the function exits successfully or = + 1, the factor or from the Cholesky factorization or , in the same storage format as .

bfloat, ndarray, shape

If the function exits successfully or = + 1, the solution matrix .

rcondfloat

If the function exits successfully or = + 1, an estimate of the reciprocal of the condition number of the matrix , computed as .

errbndfloat

If the function exits successfully or = + 1, an estimate of the forward error bound for a computed solution , such that , where is a column of the computed solution returned in the array and is the corresponding column of the exact solution . If is less than machine precision, is returned as unity.

Raises
NagValueError
(errno )

On entry, .

Constraint: .

(errno )

On entry, .

Constraint: .

(errno )

On entry, .

Constraint: .

(errno )

On entry, not one of ‘U’ or ‘u’ or ‘L’ or ‘l’: .

(errno )

The principal minor of order of the matrix is not positive definite. The factorization has not been completed and the solution could not be computed.

Warns
NagAlgorithmicWarning
(errno )

A solution has been computed, but is less than machine precision so that the matrix is numerically singular.

Notes

The Cholesky factorization is used to factor as , if , or , if , where is an upper triangular band matrix with superdiagonals, and is a lower triangular band matrix with subdiagonals. The factored form of is then used to solve the system of equations .

References

Anderson, E, Bai, Z, Bischof, C, Blackford, S, Demmel, J, Dongarra, J J, Du Croz, J J, Greenbaum, A, Hammarling, S, McKenney, A and Sorensen, D, 1999, LAPACK Users’ Guide, (3rd Edition), SIAM, Philadelphia, https://www.netlib.org/lapack/lug

Higham, N J, 2002, Accuracy and Stability of Numerical Algorithms, (2nd Edition), SIAM, Philadelphia