Learn R Programming

HiPLARM (version 0.1)

lu: (Generalized) Triangular Decomposition of a Matrix

Description

Computes (generalized) triangular decompositions of square and other dense matrices using the MAGMA GPU library or the PLASMA library for multi-core CPUs.

Usage

lu(x, ...) "lu"(x, warnSing = TRUE, ...)

Arguments

x
a dense matrix. No missing values or IEEE special values are allowed.
warnSing
(when x is a denseMatrix logical specifying if a warning should be signalled when x is singular.
...
further arguments passed to or from other methods.

Details

lu() is a generic function with special methods for different types of matrices. Use showMethods("lu") to list all the methods for the lu generic.

The method for class dgeMatrix (and all dense matrices) is based on the MAGMA "magma_dgetrf" subroutine and PLASMA "PLASMA_dgetrf". It returns a decomposition also for singular and non-square matrices. For further details on classes etc. see the Matrix package documentation.

References

Martin Maechler, Douglas Bates (Matrix package)

Examples

Run this code

##--- Dense  -------------------------
x <- Matrix(rnorm(9), 3, 3)
lu(x)
dim(x2 <- round(10 * x[,-3]))# non-square
expand(lu2 <- lu(x2))

Run the code above in your browser using DataLab