Compute Householder reflection vector housv to reflect x to be the jth column of identity, i.e.,
(I - beta*housv*housv')x = norm(x)*e(j) if x(1) < 0, (I - beta*housv*housv')x = -norm(x)*e(j) if x(1) >= 0Inputs
- x
- vector
- j
- index into vector
- z
- threshold for zero (usually should be the number 0)
Outputs (see Golub and Van Loan):
- beta
- If beta = 0, then no reflection need be applied (zer set to 0)
- housv
- householder vector