nag_lapack_zgtcon (f07cu) estimates the reciprocal condition number of a complex
by
tridiagonal matrix
, using the
factorization returned by
nag_lapack_zgttrf (f07cr).
nag_lapack_zgtcon (f07cu) should be preceded by a call to
nag_lapack_zgttrf (f07cr), 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.
nag_lapack_zgtcon (f07cu) 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.
In practice the condition number estimator is very reliable, but it can underestimate the true condition number; see Section 15.3 of
Higham (2002)
for further details.
The condition number estimation typically requires between four and five solves and never more than eleven solves, following the factorization. The total number of floating-point operations required to perform a solve is proportional to .
The real analogue of this function is
nag_lapack_dgtcon (f07cg).
This example estimates the condition number in the
-norm of the tridiagonal matrix
given by
function f07cu_example
fprintf('f07cu example results\n\n');
du = [ 2 - 1i 2 + 1i -1 + 1i 1 - 1i ];
d = [-1.3 + 1.3i -1.3 + 1.3i -1.3 + 3.3i -0.3 + 4.3i -3.3 + 1.3i];
dl = [ 1 - 2i 1 + 1i 2 - 3i 1 + 1i ];
[dlf, df, duf, du2, ipiv, info] = ...
f07cr(dl, d, du);
a = [0+0i du; d; dl 0+0i];
anorm = norm(a,1);
norm_p = '1-norm';
[rcond, info] = f07cu( ...
norm_p, dlf, df, duf, du2, ipiv, anorm);
fprintf('Estimate of condition number = %10.2e\n', 1/rcond);