|
NAG[f08ajc] NAG[nag_dorglq] - Form all or part of orthogonal from factorization determined by f08ahc (nag_dgelqf)
|
|
Calling Sequence
f08ajc(k, a, tau, 'm'=m, 'n'=n, 'fail'=fail)
nag_dorglq(. . .)
Parameters
|
k - integer;
|
|
|
On entry: , the number of elementary reflectors whose product defines the matrix .
|
|
Constraint: . .
|
|
|
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.
|
|
On entry: details of the vectors which define the elementary reflectors, as returned by f08ahc (nag_dgelqf).
|
|
|
tau - Vector(1..dim, datatype=float[8]);
|
|
|
Note: the dimension, dim, of the array tau must be at least .
|
|
|
'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_dorglq (f08ajc) generates all or part of the real orthogonal matrix from an factorization computed by f08ahc (nag_dgelqf).
|
|
Description
|
|
nag_dorglq (f08ajc) is intended to be used after a call to f08ahc (nag_dgelqf), which performs an factorization of a real matrix . The orthogonal matrix is represented as a product of elementary reflectors.
This function may be used to generate explicitly as a square matrix, or to form only its leading rows.
Usually is determined from the factorization of a by matrix with . The whole of may be computed by:
nag_dorglq (p,a,tau,'m'=n,'n'=n)
(note that the array a must have at least rows) or its leading rows by:
nag_dorglq (p,a,tau,'m'=p,'n'=n)
The rows of returned by the last call form an orthonormal basis for the space spanned by the rows of ; thus f08ahc (nag_dgelqf) followed by nag_dorglq (f08ajc) can be used to orthogonalise the rows of .
The information returned by the factorization functions also yields the factorization of the leading rows of , where . The orthogonal matrix arising from this factorization can be computed by:
nag_dorglq (k,a,tau,'m'=n,'n'=n)
or its leading rows by:
nag_dorglq (k,a,tau,'m'=k,'n'=n)
|
|
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_INT_2"
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 matrix differs from an exactly orthogonal matrix by a matrix such that
where is the machine precision.
|
|
Further Comments
|
|
The total number of floating-point operations is approximately ; when , the number is approximately .
The complex analogue of this function is f08awc (nag_zunglq).
|
|
|
Examples
|
|
>
|
m := 4:
n := 6:
k := 4:
a := Matrix([[7.629239804856051, -0.2513556382632653, 0.2820087648807367, -0.02069086046679318, -0.1578636020799776, -0.03525109561009208], [0.1206804378352315, 6.484792689972742, 0.2614412741025646, 0.1032576018728744, 0.4200952042988654, 0.007010589007406895], [0.1021464811610684, -1.661861465322362, -5.426581112124191, 0.605137487741764, -0.5386683512562429, 0.1685937776381602], [1.476634669791005, 0.1088236918688469, 0.4222885621904238, 6.255531937917222, -0.1704479056684627, -0.3498629724431616]], datatype=float[8]):
tau := Vector([1.710424647623495, 1.592936535590086, 1.187099434147982, 1.736930441655314], datatype=float[8]):
NAG:-f08ajc(k, a, tau, 'm' = m, 'n' = n):
|

|
|