|
NAG[f08bec] NAG[nag_dgeqpf] - factorization of real general rectangular matrix with column pivoting
|
|
Calling Sequence
f08bec(a, jpvt, tau, 'm'=m, 'n'=n, 'fail'=fail)
nag_dgeqpf(. . .)
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.
|
|
|
jpvt - Vector(1..dim, datatype=integer[kernelopts('wordsize')/8]);
|
|
|
Note: the dimension, dim, of the array jpvt must be at least .
|
|
|
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_dgeqpf (f08bec) computes the factorization, with column pivoting, 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_dgeqpf (f08bec) 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_dgeqpf (f08bec).
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_dgeqpf (f08bec) 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 without column pivoting, use f08aec (nag_dgeqrf).
The complex analogue of this function is f08bsc (nag_zgeqpf).
|
|
|
Examples
|
|
>
|
m := 6:
n := 5:
a := Matrix([[-0.09, 0.14, -0.46, 0.68, 1.29], [-1.56, 0.2, 0.29, 1.09, 0.51], [-1.48, -0.43, 0.89, -0.71, -0.96], [-1.09, 0.84, 0.77, 2.11, -1.27], [0.08, 0.55, -1.13, 0.14, 1.74], [-1.59, -0.72, 1.06, 1.24, 0.34]], datatype=float[8]):
jpvt := Vector([0, 0, 0, 0, 0], datatype=integer[kernelopts('wordsize')/8]):
tau := Vector(5, datatype=float[8]):
NAG:-f08bec(a, jpvt, tau, 'm' = m, 'n' = n):
|

|
|