naginterfaces.library.lapacklin.dgtcon

naginterfaces.library.lapacklin.dgtcon(norm, n, dl, d, du, du2, ipiv, anorm)[source]

dgtcon estimates the reciprocal condition number of a real tridiagonal matrix , using the factorization returned by dgttrf().

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

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

Parameters
normstr, length 1

Specifies the norm to be used to estimate .

or

Estimate .

Estimate .

nint

, the order of the matrix .

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.

anormfloat

If or , the -norm of the original matrix .

If , the -norm of the original matrix .

may be computed by calling blas.dlangt with the same value for the argument .

must be computed either before calling dgttrf() or else from a copy of the original matrix .

Returns
rcondfloat

Contains an estimate of the reciprocal condition number.

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

dgtcon 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. dgtcon then utilizes the factorization to estimate either or , from which the estimate of the reciprocal of the condition number of , is computed as either

or

is returned, rather than , since when is singular is infinite.

Note that .

References

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