naginterfaces.library.lapacklin.dgtsv

naginterfaces.library.lapacklin.dgtsv(dl, d, du, b)[source]

dgtsv computes the solution to a real system of linear equations

where is an tridiagonal matrix and and are matrices.

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

https://support.nag.com/numeric/nl/nagdoc_30.2/flhtml/f07/f07caf.html

Parameters
dlfloat, array-like, shape

Must contain the subdiagonal elements of the matrix .

dfloat, array-like, shape

Must contain the diagonal elements of the matrix .

dufloat, array-like, shape

Must contain the superdiagonal elements of the matrix .

bfloat, array-like, shape

The right-hand side matrix .

Returns
dlfloat, ndarray, shape

If no constraints are violated, is overwritten by the () elements of the second superdiagonal of the upper triangular matrix from the factorization of , in .

dfloat, ndarray, shape

If no constraints are violated, is overwritten by the diagonal elements of the upper triangular matrix from the factorization of .

dufloat, ndarray, shape

If no constraints are violated, is overwritten by the elements of the first superdiagonal of .

bfloat, ndarray, shape

If no exception or warning is raised, the solution matrix .

Raises
NagValueError
(errno )

On entry, error in parameter .

Constraint: .

(errno )

On entry, error in parameter .

Constraint: .

Warns
NagAlgorithmicWarning
(errno )

Element of the diagonal is exactly zero, and the solution has not been computed. The factorization has not been completed unless .

Notes

dgtsv uses Gaussian elimination with partial pivoting and row interchanges to solve the equations . The matrix is factorized as , where is a permutation matrix, is unit lower triangular with at most one nonzero subdiagonal element per column, and is an upper triangular band matrix, with two superdiagonals.

Note that equations may be solved by interchanging the order of the arguments and .

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