| dsRMatrix-class {Matrix} | R Documentation |
The dsRMatrix class is a class of symmetric, sparse
matrices in the compressed, row-oriented format. In this
implementation the non-zero elements in the rows are sorted into
increasing column order.
These "..RMatrix" classes are currently still mostly unimplemented!
Objects can be created by calls of the form new("dsRMatrix", ...).
uplo:"U") or the lower triangle ("L") is
stored. At present only the lower triangle form is allowed.j:"integer" of length
nnzero (number of non-zero elements). These are the row
numbers for each non-zero element in the matrix.p:"integer" of pointers, one
for each row, to the initial (zero-based) index of elements in
the row.factors:"list" - a list
of factorizations of the matrix.x:"numeric" - the non-zero
elements of the matrix.Dim:"integer" - the dimensions
of the matrix - must be an integer vector with exactly two
non-negative values.Dimnames:Matrix.
Classes RsparseMatrix, dsparseMatrix and
symmetricMatrix, directly.
Class "dMatrix", by class "dsparseMatrix",
class "sparseMatrix", by class "dsparseMatrix" or
"RsparseMatrix";
class "compMatrix" by class "symmetricMatrix" and of course,
class "Matrix".
signature(x = "dsRMatrix", uplo = "missing"):
a trivial method just returning xsignature(x = "dsRMatrix", uplo = "character"):
if uplo == x@uplo, this trivially returns x;
otherwise t(x).signature(from = "dsCMatrix", to = "dsRMatrix")
the classes dgCMatrix,
dgTMatrix, and dgeMatrix.
(m0 <- new("dsRMatrix"))
m2 <- new("dsRMatrix", Dim = c(2L,2L),
x = c(3,1), j = c(1L,1L), p = 0:2)
m2
stopifnot(colSums(as(m2, "TsparseMatrix")) == 3:4)
str(m2)
(ds2 <- forceSymmetric(diag(2))) # dsy*
dR <- as(ds2, "RsparseMatrix")
dR # dsRMatrix