dtpMatrix-class {Matrix} | R Documentation |
The "dtpMatrix"
class is the class of triangular,
dense, numeric matrices in packed storage. The "dtrMatrix"
class is the same except in nonpacked storage.
Objects can be created by calls of the form new("dtpMatrix",
...)
or by coercion from other classes of matrices.
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
.x
:"numeric"
. The numeric
values that constitute the matrix, stored in column-major order.
For a packed square matrix of dimension d * d,
length(x)
is of length d(d+1)/2 (also when
diag == "U"
!).Dim
,Dimnames
:"integer"
) and corresponding names (or NULL
),
inherited from the Matrix
, see there.
Class "ddenseMatrix"
, directly.
Class "triangularMatrix"
, directly.
Class "dMatrix"
and more by class "ddenseMatrix"
etc, see
the examples.
signature(x = "dtpMatrix", y = "dgeMatrix")
:
Matrix multiplication; ditto for several other signature
combinations, see showMethods("%*%", class = "dtpMatrix")
.signature(from = "dtpMatrix", to = "dtrMatrix")
signature(from = "dtpMatrix", to = "matrix")
signature(x = "dtpMatrix", logarithm = "missing")
: ... signature(x = "dtpMatrix", logarithm = "logical")
: ... signature(x = "dtpMatrix")
: ... signature(x = "dtpMatrix", type = "character")
: ... signature(x = "dtpMatrix", type = "missing")
: ... signature(x = "dtpMatrix", norm = "character")
: ... signature(x = "dtpMatrix", norm = "missing")
: ... signature(a = "dtpMatrix", b = "missing")
: ... signature(a = "dtpMatrix", b = "matrix")
: ... signature(x = "dtpMatrix")
: ... signature(x = "dtpMatrix")
: ...
Class dtrMatrix
showClass("dtrMatrix") example("dtrMatrix-class") (p1 <- as(T2, "dtpMatrix")) str(p1) (pp <- as(T, "dtpMatrix")) stopifnot(length(p1@x) == 3, length(pp@x) == 3, p1 @ uplo == T2 @ uplo, pp @ uplo == T @ uplo)