dsCMatrix-class {Matrix} | R Documentation |
The dsCMatrix
class is a class of symmetric, sparse
numeric matrices in the compressed, column-oriented format. In this
implementation the non-zero elements in the columns are sorted into
increasing row order.
The dsTMatrix
class is the class of
symmetric, sparse numeric matrices in triplet format.
Objects can be created by calls of the form new("dsCMatrix",
...)
or new("dsTMatrix", ...)
uplo
:"U"
or "u"
) or the lower triangle
("L"
or "l"
) is stored. At present only the lower
triangle form is allowed.p
:"integer"
of pointers, one
for each column, to the initial (zero-based) index of elements in
the column. (Only present in the dsCMatrix
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
dsTMatrix
class.)x
:"numeric"
- the non-zero
elements of the matrix.factors
:"list"
- a list
of factorizations of the matrix. Dim
:"integer"
- the dimensions
of the matrix - must be an integer vector with exactly two
non-negative values.
Class "dgCMatrix"
, directly.
signature(a = "dsCMatrix", b = "matrix")
: Solve
a linear system of equations defined by x
using a Cholesky
decomposition.signature(x = "dsCMatrix", pivot = "logical")
:
Returns (and stores) the Cholesky decomposition of the matrix
x
. If pivot
is TRUE
(the default) Metis is
used to create a reordering of the rows and columns of x
so
as to minimize fill-in.signature(x = "dsCMatrix", logarithm =
"missing")
: Evaluate the determinant of x
on the
logarithm scale. This creates and stores the Cholesky factorization.signature(x = "dsCMatrix", logarithm =
"logical")
: Evaluate the determinant of x
on the
logarithm scale or not, according to the logarithm
argument. This creates and stores the Cholesky factorization.signature(x = "dsCMatrix")
: Transpose. Because
x
is symmetric this has no effect.signature(x = "dsTMatrix")
: Transpose. For the
dsTMatrix
class the row and column indices are interchanged
so that a matrix for which the upper triangle is stored produces a
matrix for which the lower triangle is stored and vice versa.signature(from = "dsCMatrix", to = "dgTMatrix")
signature(from = "dsCMatrix", to = "dgeMatrix")
signature(from = "dsCMatrix", to = "matrix")
signature(from = "dsTMatrix", to = "dgeMatrix")
signature(from = "dsTMatrix", to = "dsCMatrix")
signature(from = "dsTMatrix", to = "dsyMatrix")
signature(from = "dsTMatrix", to = "matrix")
Classes dgCMatrix
, dgTMatrix
,
dgeMatrix
## First a "dgCMatrix" mm <- Matrix(toeplitz(c(10, 0, 1, 0, 3)), sparse = TRUE) mT <- as(mm, "dgTMatrix") (symM <- as(mT, "dsCMatrix")) str(symM)