naginterfaces.library.matop.real_​gen_​matrix_​cond_​usd

naginterfaces.library.matop.real_gen_matrix_cond_usd(a, f, data=None)[source]

real_gen_matrix_cond_usd computes an estimate of the absolute condition number of a matrix function at a real matrix in the -norm, using analytical derivatives of you have supplied.

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

https://support.nag.com/numeric/nl/nagdoc_30/flhtml/f01/f01jcf.html

Parameters
afloat, array-like, shape

The matrix .

fcallable fz = f(m, z, data=None)

Given an integer , the function evaluates at a number of points .

Parameters
mint

The order, , of the derivative required.

If , should be returned.

For , should be returned.

zcomplex, ndarray, shape

The points at which the function is to be evaluated.

dataarbitrary, optional, modifiable in place

User-communication data for callback functions.

Returns
fzcomplex, array-like, shape

The function or derivative values. should return the value , for . If lies on the real line, then so must .

dataarbitrary, optional

User-communication data for callback functions.

Returns
afloat, ndarray, shape

The matrix, .

condafloat

An estimate of the absolute condition number of at .

normafloat

The -norm of .

normfafloat

The -norm of .

Raises
NagValueError
(errno )

On entry, .

Constraint: .

(errno )

An internal error occurred when estimating the norm of the Fréchet derivative of at . Please contact NAG.

(errno )

An internal error occurred when evaluating the matrix function . You can investigate further by calling real_gen_matrix_fun_usd() with the matrix and the function .

Warns
NagCallbackTerminateWarning
(errno )

Termination requested in .

Notes

The absolute condition number of at , is given by the norm of the Fréchet derivative of , , which is defined by

where is the Fréchet derivative in the direction . is linear in and can, therefore, be written as

where the operator stacks the columns of a matrix into one vector, so that is . real_gen_matrix_cond_usd computes an estimate such that , where . The relative condition number can then be computed via

The algorithm used to find is detailed in Section 3.4 of Higham (2008).

The function , and the derivatives of , are returned by function which, given an integer , evaluates at a number of (generally complex) points , for . For any on the real line, must also be real. real_gen_matrix_cond_usd is, therefore, appropriate for functions that can be evaluated on the complex plane and whose derivatives, of arbitrary order, can also be evaluated on the complex plane.

References

Higham, N J, 2008, Functions of Matrices: Theory and Computation, SIAM, Philadelphia, PA, USA