qr {pbdDMAT}R Documentation

QR Decomposition Methods

Description

qr() takes the QR decomposition.

Usage

## S4 method for signature 'ddmatrix'
qr(x, tol = 1e-07)

## S4 method for signature 'ANY'
qr.Q(x, complete = FALSE, Dvec)

## S4 method for signature 'ANY'
qr.R(x, complete = FALSE)

## S4 method for signature 'ANY'
qr.qy(x, y)

## S4 method for signature 'ANY'
qr.qty(x, y)

Arguments

x, y

numeric distributed matrices for qr(). Otherwise, x is a list, namely the return from qr().

tol

logical value, determines whether or not columns are zero centered.

complete

logical expression of length 1. Indicates whether an arbitrary orthogonal completion of the Q or X matrices is to be made, or whether the R matrix is to be completed by binding zero-value rows beneath the square upper triangle.

Dvec

Not implemented for objects of class ddmatrix. vector (not matrix) of diagonal values. Each column of the returned Q will be multiplied by the corresponding diagonal value. Defaults to all 1's.

Details

qr.Q() recovers Q from the output of qr().

qr.R() recovers R from the output of qr().

qr.qy() multiplies y by Q.

qr.qty() multiplies y by the transpose of Q.

Functions for forming a QR decomposition and for using the outputs of these numerical QR routines.

Value

qr() returns a list consisting of: qr - rank - calculated numerical rank, tau - pivot - "class" - attribute "qr".

Examples

## Not run: 
# Save code in a file "demo.r" and run with 2 processors by
# > mpiexec -np 2 Rscript demo.r

library(pbdDMAT, quiet = TRUE)
init.grid()

# don't do this in production code
x <- matrix(1:9, 3)
x <- as.ddmatrix(x)

Q <- qr.Q(qr(x))
print(Q)

finalize()

## End(Not run)


[Package pbdDMAT version 0.4-0 Index]