SCM

SCM Repository

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

Diff of /pkg/tests/validObj.R

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 538, Thu Feb 10 13:50:27 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    ## 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 61  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.538  
changed lines
  Added in v.577

root@r-forge.r-project.org
ViewVC Help
Powered by ViewVC 1.0.0  
Thanks to:
Vienna University of Economics and Business Powered By FusionForge