SCM

SCM Repository

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

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

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

revision 756, Mon Jun 6 15:38:50 2005 UTC revision 768, Wed Jun 8 17:19:21 2005 UTC
# Line 27  Line 27 
27    
28  ## "dge"  ## "dge"
29  assertError( new("dgeMatrix", Dim = c(2,2), x= 1:4) )# double 'Dim'  assertError( new("dgeMatrix", Dim = c(2,2), x= 1:4) )# double 'Dim'
 if(paste(R.version$major, R.version$minor, sep=".") >= "2.0.1")  
30  assertError( new("dgeMatrix", Dim = as.integer(c(2,2)), x= 1:4) )# int 'x'  assertError( new("dgeMatrix", Dim = as.integer(c(2,2)), x= 1:4) )# int 'x'
31  assertError( new("dgeMatrix", Dim = 2:2, x=as.double(1:4)) )# length(Dim) !=2  assertError( new("dgeMatrix", Dim = 2:2, x=as.double(1:4)) )# length(Dim) !=2
32  assertError( new("dgeMatrix", Dim = as.integer(c(2,2)), x= as.double(1:5)))  assertError( new("dgeMatrix", Dim = as.integer(c(2,2)), x= as.double(1:5)))
# Line 51  Line 50 
50  ## "dpo"  ## "dpo"
51  chk.matrix(cm <- crossprod(m1))  chk.matrix(cm <- crossprod(m1))
52  chk.matrix(as(cm, "dsyMatrix"))  chk.matrix(as(cm, "dsyMatrix"))
53  chk.matrix(as(cm, "dgeMatrix"))  chk.matrix(dcm <- as(cm, "dgeMatrix"))
54  chk.matrix(as(cm, "dMatrix"))  chk.matrix(mcm <- as(cm, "dMatrix"))
55    #BUG - FIXME: stopifnot(identical(dcm, mcm))
56  try( chk.matrix(as(cm, "Matrix")) )# gives an error: "Matrix" has NULL 'dim()'  try( chk.matrix(as(cm, "Matrix")) )# gives an error: "Matrix" has NULL 'dim()'
57    
58  ## Cholesky  ## Cholesky
59  chk.matrix(ch <- chol(cm))  chk.matrix(ch <- chol(cm))
60  #chk.matrix(ch2 <- chol(as(cm, "dsyMatrix")))  #if(FALSE)# fails for Doug in R-devel (2005-06-06) :
61  #chk.matrix(ch3 <- chol(as(cm, "dgeMatrix")))  chk.matrix(ch2 <- chol(as(cm, "dsyMatrix")))
62  #stopifnot(all.equal(as(ch, "matrix"), as(ch2, "matrix")))  #not yet{FIXME}: chk.matrix(ch3 <- chol(as(cm, "dgeMatrix")))
63    #if(FALSE)# ...R-devel
64    stopifnot(all.equal(as(ch, "matrix"), as(ch2, "matrix")))
65    
66  ### Very basic  triangular matrix stuff  ### Very basic  triangular matrix stuff
67    

Legend:
Removed from v.756  
changed lines
  Added in v.768

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