naginterfaces.library.linsys.real_​tridiag_​fac_​solve

naginterfaces.library.linsys.real_tridiag_fac_solve(job, a, b, c, d, ipiv, y, tol)[source]

real_tridiag_fac_solve solves a system of tridiagonal equations following the factorization by matop.real_gen_tridiag_lu. This function is intended for applications such as inverse iteration as well as straightforward linear equation applications.

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

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

Parameters
jobint

Must specify the equations to be solved.

The equations are to be solved, but diagonal elements of are not to be perturbed.

The equations are to be solved and, if overflow would otherwise occur, diagonal elements of are to be perturbed. See argument .

The equations are to be solved, but diagonal elements of are not to be perturbed.

The equations are to be solved and, if overflow would otherwise occur, diagonal elements of are to be perturbed. See argument .

The equations are to be solved, but diagonal elements of are not to be perturbed.

The equations are to be solved and, if overflow would otherwise occur, diagonal elements of are to be perturbed. See argument .

afloat, array-like, shape

The diagonal elements of as returned by real_tridiag_fac_solve.

bfloat, array-like, shape

The elements of the first superdiagonal of as returned by real_tridiag_fac_solve.

cfloat, array-like, shape

The subdiagonal elements of as returned by real_tridiag_fac_solve.

dfloat, array-like, shape

The elements of the second superdiagonal of as returned by real_tridiag_fac_solve.

ipivint, array-like, shape

Details of the matrix as returned by matop.real_gen_tridiag_lu.

yfloat, array-like, shape

The right-hand side vector .

tolfloat

The minimum perturbation to be made to very small diagonal elements of . is only referenced when is negative. should normally be chosen as about , where is the machine precision, but if is supplied as non-positive, it is reset to .

Returns
yfloat, ndarray, shape

is overwritten by the solution vector .

tolfloat

If on entry is non-positive, it is reset as just described. Otherwise is unchanged.

Raises
NagValueError
(errno )

Overflow would occur computing the element in the solution. .

(errno )

On entry, .

Constraint: and and .

(errno )

On entry, .

Constraint: .

Notes

No equivalent traditional C interface for this routine exists in the NAG Library.

Following the factorization of the tridiagonal matrix as

by matop.real_gen_tridiag_lu, real_tridiag_fac_solve may be used to solve any of the equations

for , the choice of equation being controlled by the argument . In each case there is an option to perturb zero or very small diagonal elements of , this option being intended for use in applications such as inverse iteration.

References

Wilkinson, J H, 1965, The Algebraic Eigenvalue Problem, Oxford University Press, Oxford

Wilkinson, J H and Reinsch, C, 1971, Handbook for Automatic Computation II, Linear Algebra, Springer–Verlag