NAG Library Function Document
nag_complex_lu (f03ahc) computes an factorization of a complex matrix, with partial pivoting, and evaluates the determinant.
||nag_complex_lu (Integer n,
nag_complex_lu (f03ahc) computes an factorization of a complex matrix , with partial pivoting: , where is a permutation matrix, is lower triangular and is unit upper triangular. The determinant is the product of the diagonal elements of with the correct sign determined by the row interchanges.
Wilkinson J H and Reinsch C (1971) Handbook for Automatic Computation II, Linear Algebra Springer–Verlag
n – IntegerInput
On entry: , the order of the matrix .
a – ComplexInput/Output
Note: the th element of the matrix is stored in .
On entry: the by matrix .
On exit: is overwritten by the lower triangular matrix and the off-diagonal elements of the upper triangular matrix . The unit diagonal elements of are not stored.
tda – IntegerInput
: the stride separating matrix column elements in the array a
pivot[n] – IntegerOutput
On exit: gives the row index of the th pivot.
det – Complex *Output
dete – Integer *Output
On exit: the determinant of is given by . It is given in this form to avoid overflow and underflow.
fail – NagError *Input/Output
The NAG error argument (see Section 3.6
in the Essential Introduction).
6 Error Indicators and Warnings
On entry, while . The arguments must satisfy .
Dynamic memory allocation failed.
On entry, .
is singular, possibly due to rounding errors. The factorization could not be completed.
are set to zero.
The accuracy of the determinant depends on the conditioning of the original matrix. For a detailed error analysis see Wilkinson and Reinsch (1971)
8 Parallelism and Performance
The time taken by nag_complex_lu (f03ahc) is approximately proportional to .
To compute an
factorization, with partial pivoting, and calculate the determinant, of the complex matrix
10.1 Program Text
Program Text (f03ahce.c)
10.2 Program Data
Program Data (f03ahce.d)
10.3 Program Results
Program Results (f03ahce.r)