r1updt

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

        t
(S + u v ) Q

is again lower trapezoidal.

This subroutine 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, gw rotations is returned.

void
r1updt
(
Real
)
(
size_t m
,
size_t n
,
Real* s
,
size_t ls
,
Real* u
,
Real* v
,
Real* w
,
out bool sing
)

Parameters

m size_t

a positive integer input variable set to the number of rows of S.

n size_t

a positive integer input variable set to the number of columns of S. n must not exceed m.

s Real*

an array of length ls. on input s must contain the lower trapezoidal matrix S stored by columns. on output s contains the lower trapezoidal matrix produced as described above.

ls size_t

a positive integer input variable not less than (n*(2*m-n+1))/2.

u Real*

an input array of length m which must contain the vector u.

v Real*

an array of length n. on input v must contain the vector v. on output v(i) contains the information necessary to recover the Givens rotation gv(i) described above.

w Real*

an output array of length m. w(i) contains information necessary to recover the Givens rotation gw(i) described above.

sing bool

a logical output variable. sing is set true if any of the diagonal elements of the output s are zero. otherwise sing is set false.

Meta