facmul {Matrix}R Documentation

Multiplication by Decomposition Factors

Description

Performs multiplication by factors for certain decompositions (and allows explicit formation of those factors).

Usage

facmul(x, factor, y, transpose, left, ...)

Arguments

x

a matrix decomposition. No missing values or IEEE special values are allowed.

factor

an indicator for selecting a particular factor for multiplication.

y

a matrix or vector to be multiplied by the factor or its transpose. No missing values or IEEE special values are allowed.

transpose

a logical value. When FALSE (the default) the factor is applied. When TRUE the transpose of the factor is applied.

left

a logical value. When TRUE (the default) the factor is applied from the left. When FALSE the factor is applied from the right.

...

the method for "qr.Matrix" has additional arguments.

Value

the product of the selected factor (or its transpose) and y

NOTE

Factors for decompositions such as lu and qr can be stored in a compact form. The function facmul allows multiplication without explicit formation of the factors, saving both storage and operations.

References

Golub, G., and Van Loan, C. F. (1989). Matrix Computations, 2nd edition, Johns Hopkins, Baltimore.

Examples

library(Matrix)
x <- Matrix(rnorm(9), 3, 3)
## Not run: 
qrx <- qr(x)                      # QR factorization of x
y <- rnorm(3)
facmul( qr(x), factor = "Q", y)   # form Q y

## End(Not run)

[Package Matrix version 1.2-17 Index]