| dtCMatrix-class {Matrix} | R Documentation |
The "dtCMatrix" class is a class of triangular, sparse
matrices in the compressed, column-oriented format. In this
implementation the non-zero elements in the columns are sorted into
increasing row order. The "dtTMatrix" class is a class of
triangular, sparse matrices in triplet format.
Objects can be created by calls of the form new("dtCMatrix",
...) or calls of the form new("dtTMatrix", ...).
uplo:"character". Must be
either "U", for upper triangular, and "L", for lower triangular.diag:"character". Must be
either "U", for unit triangular (diagonal is all ones), or
"N"; see triangularMatrix-class.p:"integer" of pointers, one
for each column, to the initial (zero-based) index of elements in
the column. (Only present in the dtCMatrix class.)i:"integer" of length nnzero
(number of non-zero elements). These are the row numbers for
each non-zero element in the matrix.j:"integer" of length nnzero
(number of non-zero elements). These are the column numbers for
each non-zero element in the matrix. (Only present in the
dtTMatrix class.)x:"numeric" - the non-zero
elements of the matrix.Dim,Dimnames:"integer") and corresponding names (or NULL),
inherited from the Matrix-class, see there.
Class "dgCMatrix", directly.
Class "triangularMatrix", directly.
Class "dMatrix", "sparseMatrix", and more by class
"dgCMatrix" etc, see the examples.
signature(from = "dtCMatrix", to = "dgTMatrix")signature(from = "dtCMatrix", to = "dgeMatrix")signature(from = "dtTMatrix", to = "dgeMatrix")signature(from = "dtTMatrix", to = "dtrMatrix")signature(from = "dtTMatrix", to = "matrix")signature(x = "dtCMatrix"): returns the transpose of
xsignature(x = "dtTMatrix"): returns the transpose of
x
dgCMatrix-class, dgTMatrix-class,
dgeMatrix-class, dtrMatrix-class
showClass("dtCMatrix")
showClass("dtTMatrix")
t1 <- new("dtTMatrix", x= c(3,7), i= 0:1, j=3:2, Dim= as.integer(c(4,4)))
t1
## from 0-diagonal to unit-diagonal {low-level step}:
tu <- t1 ; tu@diag <- "U"
tu
(cu <- as(tu, "dtCMatrix"))
str(cu)# only two entries in @i and @x