SCM Repository

[matrix] Diff of /branches/Matrix-mer2/tests/validObj.R
 [matrix] / branches / Matrix-mer2 / tests / validObj.R

Diff of /branches/Matrix-mer2/tests/validObj.R

revision 847, Thu Aug 11 06:44:09 2005 UTC revision 850, Tue Aug 16 17:38:04 2005 UTC
# Line 33  Line 33
33
34  chk.matrix(m1 <- Matrix(1:6, ncol=2))  chk.matrix(m1 <- Matrix(1:6, ncol=2))
35  chk.matrix(m2 <- Matrix(1:7, ncol=3)) # a (desired) warning  chk.matrix(m2 <- Matrix(1:7, ncol=3)) # a (desired) warning
36  stopifnot(is(m1) == c("dgeMatrix", "ddenseMatrix", "dMatrix", "Matrix"),  stopifnot(unique(is(m1)) == c("dgeMatrix", "ddenseMatrix",
37                "dMatrix", "denseMatrix", "Matrix"),
38            dim(t(m1)) == 2:3,            dim(t(m1)) == 2:3,
39            identical(m1, t(t(m1))))            identical(m1, t(t(m1))))
40  c.nam <- paste("C",1:2, sep='')  c.nam <- paste("C",1:2, sep='')
# Line 81  Line 82
82            TRUE) ## not yet: class(t.22) == "dtrMatrix")            TRUE) ## not yet: class(t.22) == "dtrMatrix")
83
84
85  ## non-square  triagonal Matrices --- should this be forbidden anyway? ---  ## non-square triagonal Matrices --- are forbidden ---
86  try(tru <- new("dtrMatrix", Dim = 2:3, x=as.double(1:6), uplo="L", diag="U"))  try(tru <- new("dtrMatrix", Dim = 2:3,
87  try(trn <- new("dtrMatrix", Dim = 2:3, x=as.double(1:6), uplo="L", diag="N"))                 x=as.double(1:6), uplo="L", diag="U"))
#tru + trn  # a 'dgeMatrix'

#as(t(tru),"dgeMatrix")
#as(t(trn),"dgeMatrix")
#as(t(t(tru)), "dgeMatrix")# pretty non sense

Legend:
 Removed from v.847 changed lines Added in v.850

 root@r-forge.r-project.org ViewVC Help Powered by ViewVC 1.0.0
Thanks to: