LU-class {Matrix}R Documentation

LU Matrix Decompositions

Description

The "LU" class is the class of LU decompositions of real matrices.

Objects from the Class

Objects can be created by calls of the form new("LU", ...). More commonly the objects are created explicitly from calls of the form lu(mm) where mm is an object that inherits from the "dgeMatrix" class or as a side-effect of other functions applied to "dgeMatrix" objects.

Slots

x:
object of class "numeric". The "L" (unit lower triangular) and "U" (upper triangular) factors of the original matrix. These are stored in a packed format described in the Lapack manual.
Dim:
Object of class "integer" - the dimensions of the original matrix - must be an integer vector with exactly two non-negative values.
pivot:
Object of class "integer" - a vector of length min(Dim) that describes the permutation applied to the rows of the original matrix. The contents of this vector are described in the Lapack manual.

Methods

expand
signature(x = "LU"): Produce the "L" and "U" factors as a named list of matrices.

See Also

dgeMatrix-class, lu, expand

Examples

mm <- Matrix(round(rnorm(9),2), nrow = 3, ncol = 3)
mm
str(lum <- lu(mm))
elu <- expand(lum)
elu
elu$L %*% elu$U

[Package Matrix version 0.95-5 Index]