|
NAG[f03afc] NAG[nag_real_lu] - factorization and determinant of real matrix
|
|
Calling Sequence
f03afc(a, pivot, detf, dete, 'n'=n, 'tda'=tda, 'fail'=fail)
nag_real_lu(. . .)
Parameters
|
a - Matrix(1..n, 1..tda, datatype=float[8], order=C_order);
|
|
|
|
pivot - Vector(1..n, datatype=integer[kernelopts('wordsize')/8]);
|
|
|
On exit: gives the row index of the th pivot.
|
|
|
detf - assignable;
dete - assignable;
|
|
|
Note: On exit the variable detf will have a value of type float, dete will have a value of type integer.
|
|
On exit: the determinant of is given by . It is given in this form to avoid overflow or underflow.
|
|
|
'n'=n - integer; (optional)
|
|
|
Default value: the first dimension of the arrays a, pivot and the second dimension of the arrays a, pivotthe array a.
|
|
On entry: , the order of the matrix .
|
|
Constraint: . .
|
|
|
'tda'=tda - integer; (optional)
|
|
|
On entry: the second dimension of the array a as declared in the function from which nag_real_lu (f03afc) is called.
|
|
Constraint: . .
|
|
|
'fail'=fail - table; (optional)
|
|
|
The NAG error argument, see the documentation for NagError.
|
|
|
|
Description
|
|
|
Purpose
|
|
nag_real_lu (f03afc) computes an factorization of a real matrix, with partial pivoting, and evaluates the determinant.
|
|
Error Indicators and Warnings
|
|
"NE_ALLOC_FAIL"
Dynamic memory allocation failed.
"NE_INT_ARG_LT"
On entry, n must not be less than 1: .
"NE_SINGULAR"
The matrix is singular, possibly due to rounding errors. The factorization could not be completed. detf and dete are set to zero.
|
|
Accuracy
|
|
The accuracy of the determinant depends on the conditioning of the original matrix. For a detailed error analysis, see Wilkinson and Reinsch (1971).
|
|
Further Comments
|
|
The time taken by nag_real_lu (f03afc) is approximately proportional to .
|
|
|
Examples
|
|
>
|
n := 3:
tda := 3:
a := Matrix([[33, 16, 72], [-24, -10, -57], [-8, -4, -17]], datatype=float[8], order='C_order'):
pivot := Vector(3, datatype=integer[kernelopts('wordsize')/8]):
NAG:-f03afc(a, pivot, detf, dete, 'n' = n, 'tda' = tda):
|
|
|