ddiMatrix-class {Matrix} | R Documentation |
The class "ddiMatrix"
of numerical diagonal matrices.
Note that diagonal matrices extend dense, not sparse matrices.
Objects can be created by calls of the form new("ddiMatrix", ...)
but typically rather via Diagonal
.
x
:x
slot is of length n or 0
,
depending on the diag
slot:diag
:"character"
string, either "U"
or
"N"
where "U"
denotes unit-diagonal, i.e., identity
matrices.Dim
,Dimnames
:dimnames
, see the Matrix
class
description.
Class "diagonalMatrix"
, directly.
Class "ddenseMatrix"
, directly.
Classes "denseMatrix"
and "dMatrix"
and their super
classes, indirectly, see showClass("ddiMatrix")
.
signature(x = "ddiMatrix", y = "ddiMatrix")
: ...
Class diagonalMatrix
and function Diagonal
.
(d2 <- Diagonal(x = c(10,1))) str(d2) ## slightly larger in internal size: str(as(d2, "sparseMatrix")) M <- Matrix(cbind(1,2:4)) M %*% d2 #> `fast' multiplication chol(d2) # trivial