naginterfaces.library.lapacklin.zgtsv¶

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

zgtsv computes the solution to a complex system of linear equations

where is an tridiagonal matrix and and are matrices.

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

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

Parameters
dlcomplex, array-like, shape

Must contain the subdiagonal elements of the matrix .

dcomplex, array-like, shape

Must contain the diagonal elements of the matrix .

ducomplex, array-like, shape

Must contain the superdiagonal elements of the matrix .

bcomplex, array-like, shape

The right-hand side matrix .

Returns
dlcomplex, 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 .

dcomplex, ndarray, shape

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

ducomplex, ndarray, shape

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

bcomplex, 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

zgtsv 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 the 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