Construct modified Givens rotation | SROTMG/DROTMG |
param(1) = 1 | H = | param(2) | 1 | |
param(5) | ||||
|
|
|
|
|
For each of the four values of param(1), only the indicated values of param(2) through param(5) are defined. The 0, 1, and −1 elements are not stored in param.
Notes VECLIB also contains subprograms that construct and apply ordinary 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 Construct a modified Givens plane rotation that rotates vectors d1x and d2y in such a way as to annihilate d2y1. x and y are vectors 10 elements long stored in
REAL*8 D1,D2,X(20),Y(20),PARAM(5)
CALL DROTMG (D1,D2,X(1),Y(1),PARAM)
X(1) is the rotated result, so it should not be rotated by a subsequent call to
DROTM.
Chapter 2 Basic Vector Operations 129