ddiMatrix-class {Matrix}R Documentation

Class "ddiMatrix" of Diagonal Numeric Matrices

Description

The class "ddiMatrix" of numerical diagonal matrices.

Objects from the Class

Objects can be created by calls of the form new("ddiMatrix", ...) but typically rather via Diagonal.

Slots

x:
Object of class "numeric" ~~
diag:
Object of class "character" ~~
Dim:
Object of class "integer" ~~
Dimnames:
Object of class "list" ~~
factors:
Object of class "list" ~~

Extends

Class "diagonalMatrix", directly. Class "dMatrix", directly. Class "denseMatrix", by class "diagonalMatrix". Class "Matrix", by class "denseMatrix" and class "dMatrix".

Methods

%*%
signature(x = "ddiMatrix", y = "ddiMatrix"): ...

See Also

Class diagonalMatrix and function Diagonal.

Examples

(d2 <- Diagonal(x = c(10,1)))
str(d2)
## slightly larger:
str(as(d2, "sparseMatrix"))

M <- Matrix(cbind(1,2:4))
M %*% d2 #> `fast' multiplication

[Package Matrix version 0.995-11 Index]