Apply modified Givens rotation

SROTM/DROTM

Name

SROTM/DROTM

 

 

Apply modified Givens rotation

 

Purpose

Given a modified Givens rotation matrix H = {hij} as constructed by SROTMG

 

or DROTMG, and real vectors x and y of length n, these subprograms apply the

 

modified rotation

 

xi

 

 

h11

h12

 

 

xi

 

for i = 1, …, n.

 

 

 

 

 

yi

 

 

h21

h22

 

 

yi

 

 

 

 

 

 

 

 

 

Refer to the description of the companion subprograms SROTMG and

DROTMG for more details about the modified Givens rotation.

The vectors can be stored in one-dimensional arrays or in either rows or columns of two-dimensional arrays, and the indexing through the arrays can be either forward or backward.

Usage

VECLIB:

 

 

 

INTEGER*4

n, incx, incy

 

 

REAL*4

x(lenx), y(leny), param(5)

 

CALL SROTM(n, x, incx, y, incy, param)

 

INTEGER*4

n, incx, incy

 

 

REAL*8

x(lenx), y(leny), param(5)

 

CALL DROTM(n, x, incx, y, incy, param)

 

VECLIB8:

 

 

 

INTEGER*8

n, incx, incy

 

 

REAL*4

x(lenx), y(leny), param(5)

 

CALL SROTM(n, x, incx, y, incy, param)

 

INTEGER*8

n, incx, incy

 

 

REAL*8

x(lenx), y(leny), param(5)

 

CALL DROTM(n, x, incx, y, incy, param)

Input

n

Number of elements of vectors x and y to be used. If

 

 

n ≤ 0, the subprograms do not reference x or y.

 

x

Array of length lenx = (n−1)⋅incx+1 containing the

 

 

n-vector x.

 

 

incx

Increment for the array x, incx ≠ 0:

 

 

incx > 0

x is stored forward in array x; that is,

 

 

 

xi is stored in x((i−1)⋅incx+1).

Chapter 2 Basic Vector Operations 123