Apply modified Givens rotation |
| SROTM/DROTM | |
| incy | Increment for the array y, incy ≠ 0: | |
|
| incy > 0 | y is stored forward in array y; that is, |
|
|
| yi is stored in y((i−1)⋅incy+1). |
|
| incy < 0 | y is stored backward in array y; that |
|
|
| is, yi is stored in y((i−n)⋅incy+1). |
|
| Use incy = 1 if the vector y is stored contiguously in | |
|
| array y; that is, if yi is stored in y(i). Refer to “BLAS | |
|
| Indexing Conventions” in the introduction to this | |
|
| chapter. |
|
| param | Array containing the matrix elements of the modified | |
|
| Givens rotation matrix H and a flag indicating which | |
|
| form the rotation matrix takes, and therefore which of | |
|
| the elements of param are significant. param is usually | |
|
| set by the companion subprogram SROTMG or | |
|
| DROTMG; refer to the description of these companion | |
|
| subprograms for the specific contents of param. | |
Output | x and y | If n ≤ 0 or if param(1) = −2, x and y are unchanged. | |
|
| Otherwise, the result vectors overwrite the input. |
Notes The result is unspecified if incx = 0 or incy = 0 or if x and y overlap such that any element of x shares a memory location with any element of y.
VECLIB also contains subprograms that construct and apply regular Givens rotations. They are documented elsewhere in this chapter. The modified Givens subprograms are a little more difficult to use but are more efficient.
Example 1 Apply a modified Givens rotation to x and y, vectors 10 elements long stored in
INTEGER*4 N,INCX,INCY
REAL*8 | X(20),Y(20),PARAM(5) | |
N = 10 |
| |
INCX = 1 |
| |
INCY | = 1 |
|
CALL | DROTM (N,X,INCX,Y,INCY,PARAM) |
Chapter 2 Basic Vector Operations 125