# SCM Repository

[matrix] Diff of /pkg/tests/validObj.R
 [matrix] / pkg / tests / validObj.R

# Diff of /pkg/tests/validObj.R

revision 576, Sat Feb 26 18:18:30 2005 UTC revision 577, Sat Feb 26 18:24:35 2005 UTC
# Line 39  Line 39
39  chk.matrix(cm <- crossprod(m1))  chk.matrix(cm <- crossprod(m1))
40  chk.matrix(as(cm, "dsyMatrix"))  chk.matrix(as(cm, "dsyMatrix"))
41  chk.matrix(as(cm, "dgeMatrix"))  chk.matrix(as(cm, "dgeMatrix"))
42  try( chk.matrix(as(cm, "Matrix")) ) # gives an error  try( chk.matrix(as(cm, "Matrix")) )# gives an error: "Matrix" has NULL 'dim()'
43
44  ## Cholesky  ## Cholesky
45  chk.matrix(ch <- chol(cm))  chk.matrix(ch <- chol(cm))
# Line 52  Line 52
52  assertError( new("dtrMatrix", Dim = c(2,2), x= 1:4) )# double 'Dim'  assertError( new("dtrMatrix", Dim = c(2,2), x= 1:4) )# double 'Dim'
53  if(FALSE)## FIXME: this creates an integer '@ x' !  if(FALSE)## FIXME: this creates an integer '@ x' !
54  assertError( new("dtrMatrix", Dim = as.integer(c(2,2)), x= 1:4) )# int 'x'  assertError( new("dtrMatrix", Dim = as.integer(c(2,2)), x= 1:4) )# int 'x'
55  if(FALSE)## FIXME: this causes a segfault  ## This caused a segfault (before revision r1172 in ../src/dtrMatrix.c):
56  assertError( new("dtrMatrix", Dim = 2:2, x=as.double(1:4)) )# length(Dim) !=2  assertError( new("dtrMatrix", Dim = 2:2, x=as.double(1:4)) )# length(Dim) !=2
57  assertError( new("dtrMatrix", Dim = as.integer(c(2,2)), x= as.double(1:5)))  assertError( new("dtrMatrix", Dim = as.integer(c(2,2)), x= as.double(1:5)))
58
# Line 62  Line 62
62  ## non-square  ## non-square
63  tru <- new("dtrMatrix", Dim = 2:3, x=as.double(1:6), uplo="L", diag="U")  tru <- new("dtrMatrix", Dim = 2:3, x=as.double(1:6), uplo="L", diag="U")
64  trn <- new("dtrMatrix", Dim = 2:3, x=as.double(1:6), uplo="L", diag="N")  trn <- new("dtrMatrix", Dim = 2:3, x=as.double(1:6), uplo="L", diag="N")
65  try( tru + trn ) # not yet  tru + trn  # a 'dgeMatrix'
66
67  try( t(tru) ) ## FIXME !  try( t(tru) ) ## FIXME !
68  try( t(trn) ) ## FIXME  try( t(trn) ) ## FIXME

Legend:
 Removed from v.576 changed lines Added in v.577