naginterfaces.library.lapacklin.dgttrs

naginterfaces.library.lapacklin.dgttrs(trans, dl, d, du, du2, ipiv, b)[source]

dgttrs computes the solution to a real system of linear equations or , where is an tridiagonal matrix and and are matrices, using the factorization returned by dgttrf().

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

https://www.nag.com/numeric/nl/nagdoc_27.3/flhtml/f07/f07cef.html

Parameters
transstr, length 1

Specifies the equations to be solved as follows:

Solve for .

or

Solve for .

dlfloat, array-like, shape

Must contain the multipliers that define the matrix of the factorization of .

dfloat, array-like, shape

Must contain the diagonal elements of the upper triangular matrix from the factorization of .

dufloat, array-like, shape

Must contain the elements of the first superdiagonal of .

du2float, array-like, shape

Must contain the elements of the second superdiagonal of .

ipivint, array-like, shape

Must contain the pivot indices that define the permutation matrix . At the th step, row of the matrix was interchanged with row , and must always be either or , indicating that a row interchange was not performed.

bfloat, array-like, shape

The matrix of right-hand sides .

Returns
bfloat, ndarray, shape

The solution matrix .

Raises
NagValueError
(errno )

On entry, error in parameter .

Constraint: , or .

(errno )

On entry, error in parameter .

Constraint: .

(errno )

On entry, error in parameter .

Constraint: .

Notes

dgttrs should be preceded by a call to dgttrf(), which uses Gaussian elimination with partial pivoting and row interchanges to factorize the matrix as

where is a permutation matrix, is unit lower triangular with at most one nonzero subdiagonal element in each column, and is an upper triangular band matrix, with two superdiagonals. dgttrs then utilizes the factorization to solve the required 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