HP MLIB User's Guide Vol. 1 7th Ed.
120 HP MLIB User’s Guide
SROTI/DROTI Apply sparse Givens rotation
Name SROTI/DROTI
Apply sparse Givens rotation
Purpose Given real scalars c and s, a sparse vector x stored in compact form via a set of
indices, and a dense vector y stored in full storage form, these subprograms
apply the Givens rotation
More precisely, let x be a sparse n-vector with m ≤ n interesting (usually
nonzero) elements, and let {k
1
, k
2
, ..., k
m
} be the indices of these elements. All
uninteresting elements of x are assumed to be zero. Let y be an ordinary
n-vector that has zero elements corresponding to the uninteresting elements of
x. If x is represented by arrays x and indx such that indx(i)=k
i
and x(i)=x
k
i
,
these subprograms compute
Usually, c and s have been determined by the companion subprogram SROTG
or DROTG.
Usage VECLIB:
INTEGER*4 m, indx(m)
REAL*4 x(m), y(n), c, s
CALL SROTI(m, x, indx, y, c, s)
INTEGER*4 m, indx(m)
REAL*8 x(m), y(n), c, s
CALL DROTI(m, x, indx, y, c, s)
VECLIB8:
INTEGER*8 m, indx(m)
REAL*4 x(m), y(n), c, s
CALL SROTI(m, x, indx, y, c, s)
INTEGER*8 m, indx(m)
REAL*8 x(m), y(n), c, s
CALL DROTI(m, x, indx, y, c, s)
x
i
y
i
cs
s– c
←
x
i
y
i
⋅ for i 1 … n.,,=
x
i
y
k
i
cs
s– c
←
x
i
y
k
i
⋅ for i 1 … m.,,=