facmul.qr.Matrix(x, factor, y, transpose = F, left = T, ncols, full = T, tune)
"qr.Matrix"
.
left = T
) or
number of columns (
left = F
) in the matrix underlying
x
, so that either
the factor itself (
transpose = F
) or its transpose
(
transpose = T
) are returned when
y
is missing.
y
or on the right. The default is multiplication on the left.
x
(after pivoting) that are to be included in the orthogonal factor.
By default, the largest possible value is used for
ncols
, which is equal
to the minimum dimension of the matrix underlying
x
.
x
has row dimension m and column dimension n,
with m greater than n, then if
full = T
, Q is m x m and R is m x n, while
if
full = F
, Q is m by n and R is n x n.
NB
,
NBMIN
, and
NX
as described in
.laenv
.
The default is to use the settings in
.laenv
, which in S-PLUS is initialized
to use an unblocked algorithm (
NB = 1
), but may be changed by the user.
Based on the functions dormqr, dorgqr, zungqr, and zunmqr from LAPACK
(Anderson et al. 1994).
The orthonormal/unitary factor in an
"qr.Matrix"
object is stored in a
compact form representing elementary transformations whose product give the
full factor. This function enables products involving this to be obtained
efficiently without its explicit formation.
Anderson, E., et al. (1994). LAPACK User's Guide, 2nd edition, SIAM, Philadelphia.
x <- Matrix( rnorm(36), nrow = 9, ncol = 4) z <- qr(x, pivot = T) # QR factorization of x max(abs(facmul(z,"Q", facmul(z,"R")) - x[,z$pivot])) # test product of Q and R