|
NAG[f08aec] NAG[nag_dgeqrf] - factorization of real general rectangular matrix
|
|
Calling Sequence
f08aec(a, tau, 'm'=m, 'n'=n, 'fail'=fail)
nag_dgeqrf(. . .)
Parameters
|
a - Matrix(1..dim1, 1..dim2, datatype=float[8], order=order);
|
|
|
Note: this array may be supplied in Fortran_order or C_order , as specified by order. All array parameters must use a consistent order.
|
|
|
tau - Vector(1..dim, datatype=float[8]);
|
|
|
Note: the dimension, dim, of the array tau must be at least .
|
|
On exit: further details of the orthogonal matrix .
|
|
|
'm'=m - integer; (optional)
|
|
|
Default value: the first dimension of the array a.
|
|
On entry: , the number of rows of the matrix .
|
|
Constraint: . .
|
|
|
'n'=n - integer; (optional)
|
|
|
Default value: the second dimension of the array a.
|
|
On entry: , the number of columns of the matrix .
|
|
Constraint: . .
|
|
|
'fail'=fail - table; (optional)
|
|
|
The NAG error argument, see the documentation for NagError.
|
|
|
|
Description
|
|
|
Purpose
|
|
nag_dgeqrf (f08aec) computes the factorization of a real by matrix.
|
|
Error Indicators and Warnings
|
|
"NE_ALLOC_FAIL"
Dynamic memory allocation failed.
"NE_BAD_PARAM"
On entry, argument had an illegal value.
"NE_INT"
On entry, . Constraint: .
On entry, . Constraint: .
"NE_INTERNAL_ERROR"
An internal error has occurred in this function. Check the function call and any array sizes. If the call is correct then please consult NAG for assistance.
|
|
Accuracy
|
|
The computed factorization is the exact factorization of a nearby matrix , where
and is the machine precision.
|
|
Further Comments
|
|
The total number of floating-point operations is approximately if or if .
To form the orthogonal matrix nag_dgeqrf (f08aec) may be followed by a call to f08afc (nag_dorgqr):
nag_dorgqr (min(m,n),a,tau,'m'=m,'n'=m)
but note that the second dimension of the array a must be at least m, which may be larger than was required by nag_dgeqrf (f08aec).
When , it is often only the first columns of that are required, and they may be formed by the call:
nag_dorgqr (n,a,tau,'m'=m,'n'=n)
To apply to an arbitrary real rectangular matrix , nag_dgeqrf (f08aec) may be followed by a call to f08agc (nag_dormqr). For example,
nag_dormqr ("Nag_LeftSide","Nag_Trans",min(m,n),a,tau,c,'m'=m,'n'=p)
forms , where is by .
To compute a factorization with column pivoting, use f08bec (nag_dgeqpf).
The complex analogue of this function is f08asc (nag_zgeqrf).
|
|
|
Examples
|
|
>
|
m := 6:
n := 4:
a := Matrix([[-0.57, -1.28, -0.39, 0.25], [-1.93, 1.08, -0.31, -2.14], [2.3, 0.24, 0.4, -0.35], [-1.93, 0.64, -0.66, 0.08], [0.15, 0.3, 0.15, -2.13], [-0.02, 1.03, -1.43, 0.5]], datatype=float[8]):
tau := Vector(4, datatype=float[8]):
NAG:-f08aec(a, tau, 'm' = m, 'n' = n):
|
|
|