
Last chance! 50% off unlimited learning
Sale ends in
"ntrMatrix"
class is the class of triangular, dense,
logical matrices in nonpacked storage. The "ntpMatrix"
class
is the same except in packed storage."ntrMatrix"
extends class "ngeMatrix"
, directly, whereas
"ntpMatrix"
extends class "ndenseMatrix"
, directly. Both extend Class "triangularMatrix"
, directly,
and class "denseMatrix"
, "lMatrix"
and others,
indirectly, use showClass("nsyMatrix")
, e.g., for
details.
t()
and coercion methods (for
as(.)
; use, e.g.,
showMethods(class="nsyMatrix")
for details.ngeMatrix
, Matrix
;
function t
showClass("ntrMatrix")
str(new("ntpMatrix"))
(nutr <- as(upper.tri(matrix(,4,4)), "ntrMatrix"))
str(nutp <- as(nutr, "ntpMatrix"))# packed matrix: only 10 = (4+1)*4/2 entries
!nutp ## the logical negation (is *not* logical triangular !)
## but this one is:
stopifnot(all.equal(nutp, as(!!nutp, "ntpMatrix")))
Run the code above in your browser using DataLab