re-triangularizes a matrix after a rank one update
Given an M by N lower trapezoidal matrix S, an M-vector U, and an N-vector V, the problem is to determine an orthogonal matrix Q such that
(S + U * V' ) * Q
is again lower trapezoidal.
This function determines Q as the product of 2 * (N - 1) transformations
GV(N-1)...GV(1)GW(1)...*GW(N-1)
where GV(I), GW(I) are Givens rotations in the (I,N) plane which eliminate elements in the I-th and N-th planes, respectively. Q itself is not accumulated, rather the information to recover the GV and GW rotations is returned.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer | :: | m |
In - number of rows of S. |
|||
| integer | :: | n |
In - number of columns of S. N must not exceed M. |
|||
| real(kind=dp) | :: | s(ls) |
In/Out - On input, the lower trapezoidal matrix S stored by columns. On output S contains the lower trapezoidal matrix produced as described above. |
|||
| integer | :: | ls |
In - length of the S array. LS must be at least (N(2M-N+1))/2. |
|||
| real(kind=dp) | :: | u(m) |
In - the U vector. |
|||
| real(kind=dp) | :: | v(n) |
In/Out - On input, V must contain the vector V. On output V contains the information necessary to recover the Givens rotations GV described above. |
|||
| real(kind=dp) | :: | w(m) |
Out - contains information necessary to recover the Givens rotations GW described above. |
|||
| logical | :: | sing |
Out - is set to TRUE if any of the diagonal elements of the output S are zero. Otherwise SING is set FALSE. |