dsyMatrix-class {Matrix}R Documentation

Symmetric, dense matrices

Description

The "dsyMatrix" class is the class of symmetric, dense matrices in non-packed storage and "dsyMatrix" is the class of symmetric dense matrices in packed storage. Only the upper triangle or the lower triangle is stored.

Objects from the Class

Objects can be created by calls of the form new("dsyMatrix", ...).

Slots

uplo:
Object of class "character". Must be either "U", for upper triangular, and "L", for lower triangular.
x:
Object of class "numeric". The numeric values that constitute the matrix, stored in column-major order.
Dim:
Object of class "integer". The dimensions of the matrix which must be a two-element vector of non-negative integers.
rcond:
Object of class "numeric". A named numeric vector of reciprocal condition numbers in either the 1-norm "O" or the infinity norm "I".
factors:
Object of class "list". A named list of factorizations that have been computed for the matrix.

Extends

Class "dgeMatrix", directly. Class "Matrix", by class "dgeMatrix".

Methods

coerce
signature(from = "dspMatrix", to = "dgeMatrix")
coerce
signature(from = "dsyMatrix", to = "dgeMatrix")
coerce
signature(from = "dspMatrix", to = "matrix")
coerce
signature(from = "dsyMatrix", to = "matrix")
coerce
signature(from = "dsyMatrix", to = "dspMatrix")
coerce
signature(from = "dspMatrix", to = "dsyMatrix")
norm
signature(x = "dspMatrix", type = "character")
norm
signature(x = "dsyMatrix", type = "character")
norm
signature(x = "dspMatrix", type = "missing")
norm
signature(x = "dsyMatrix", type = "missing")
solve
signature(a = "dspMatrix", b = "missing")
solve
signature(a = "dsyMatrix", b = "missing")
solve
signature(a = "dspMatrix", b = "dgeMatrix")
solve
signature(a = "dsyMatrix", b = "dgeMatrix")
solve
signature(a = "dspMatrix", b = "matrix")
solve
signature(a = "dsyMatrix", b = "matrix")

See Also

dgeMatrix-class, Matrix-class, solve, norm, rcond, t

Examples

## Only upper triangular part matters (when uplo == "U" as per default)
(sy2 <- new("dsyMatrix", Dim = as.integer(c(2,2)), x = c(14, NA,32,77)))
(c2 <- chol(sy2))
str(c2)

## An example where chol() can't work
(sy3 <- new("dsyMatrix", Dim = as.integer(c(2,2)), x = c(14, -1, 2, -7)))

## gives an error in R <= 2.0.0 :
## Not run: 
validObject(as(sy3, "dpoMatrix"), test=TRUE) # >> is not pos.def.
## End(Not run)
try(chol(sy3)) ## Error: not pos.def

[Package Matrix version 0.95-10 Index]