F06QPF performs a
QR factorization of an upper triangular matrix which has been modified by a rank-1 update:
where
U and
R are
n by
n real upper triangular matrices,
x and
y are
n-element real vectors,
α is a real scalar, and
Q is an
n by
n real orthogonal matrix.
Q is formed as the product of two sequences of plane rotations:
where
- Pk is a rotation in the k,n plane, chosen to annihilate xk: thus Px=βen, where P=P1P2⋯Pn-1 and en is the last column of the unit matrix;
- Qk is a rotation in the k,n plane, chosen to annihilate the n,k element of αβenyT+PU, and thus restore it to upper triangular form.
The
2 by
2 plane rotation part of
Pk or
Qk has the form
The tangents of the rotations
Pk are returned in the array
X; the cosines and sines of these rotations can be recovered by calling
F06BCF. The cosines and sines of the rotations
Qk are returned directly in the arrays
C and
S.
None.
- 1: N – INTEGERInput
On entry: n, the order of the matrices U and R.
Constraint:
N≥0.
- 2: ALPHA – REAL (KIND=nag_wp)Input
On entry: the scalar α.
- 3: X(*) – REAL (KIND=nag_wp) arrayInput/Output
-
Note: the dimension of the array
X
must be at least
max1,
1+N-1
×INCX
.
On entry: the
n-element vector
x.
xi must be stored in
X1+i-1×INCX, for
i=1,2,…,N.
Intermediate elements of
X are not referenced.
On exit: the referenced elements are overwritten by details of the sequence of plane rotations.
- 4: INCX – INTEGERInput
On entry: the increment in the subscripts of
X between successive elements of
x.
Constraint:
INCX>0.
- 5: Y(*) – REAL (KIND=nag_wp) arrayInput
-
Note: the dimension of the array
Y
must be at least
max1,
1+N-1
×INCY
.
On entry: the
n-element vector
y.
yi must be stored in
Y1+i-1×INCY, for
i=1,2,…,N.
Intermediate elements of
Y are not referenced.
- 6: INCY – INTEGERInput
On entry: the increment in the subscripts of
Y between successive elements of
y.
Constraint:
INCY>0.
- 7: A(LDA,*) – REAL (KIND=nag_wp) arrayInput/Output
-
Note: the second dimension of the array
A
must be at least
N.
On entry: the n by n upper triangular matrix U.
On exit: the upper triangular matrix R.
- 8: LDA – INTEGERInput
On entry: the first dimension of the array
A as declared in the (sub)program from which F06QPF is called.
Constraint:
LDA≥ max1,N .
- 9: C(N-1) – REAL (KIND=nag_wp) arrayOutput
On exit: the cosines of the rotations
Qk, for k=1,2,…,n-1.
- 10: S(N-1) – REAL (KIND=nag_wp) arrayOutput
On exit: the sines of the rotations
Qk, for k=1,2,…,n-1.
None.
Not applicable.
None.
None.